Skip to content
Snippets Groups Projects
Commit b398e505 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FIX #15578 TIME 0:05 fix cannot create login/home page message if not in database

parent 6e16bf0d
No related branches found
No related tags found
No related merge requests found
...@@ -204,7 +204,10 @@ class ParameterController ...@@ -204,7 +204,10 @@ class ParameterController
} else { } else {
$parameter = ParameterModel::getById(['id' => $args['id']]); $parameter = ParameterModel::getById(['id' => $args['id']]);
if (empty($parameter)) { if (empty($parameter)) {
return $response->withStatus(400)->withJson(['errors' => 'Parameter not found']); if (!in_array($args['id'], ['loginpage_message', 'homepage_message'])) {
return $response->withStatus(400)->withJson(['errors' => 'Parameter not found']);
}
ParameterModel::create(['id' => $args['id']]);
} }
$check = (empty($body['param_value_int']) || Validator::intVal()->validate($body['param_value_int'])); $check = (empty($body['param_value_int']) || Validator::intVal()->validate($body['param_value_int']));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment