Skip to content
Snippets Groups Projects
Commit 7e2e1c07 authored by Quentin Ribac's avatar Quentin Ribac
Browse files

FIX #20811 TIME 0:05 prevent PHP warnings

parent b7334416
No related branches found
No related tags found
No related merge requests found
......@@ -1288,16 +1288,16 @@ class ResController extends ResourceControlController
public function getProcessingData(Request $request, Response $response, array $args)
{
if (!Validator::intVal()->validate($args['groupId'])) {
if (!Validator::intVal()->validate($args['groupId'] ?? null)) {
return $response->withStatus(403)->withJson(['errors' => 'groupId param is not an integer']);
}
if (!Validator::intVal()->validate($args['userId'])) {
if (!Validator::intVal()->validate($args['userId'] ?? null)) {
return $response->withStatus(403)->withJson(['errors' => 'userId param is not an integer']);
}
if (!Validator::intVal()->validate($args['basketId'])) {
if (!Validator::intVal()->validate($args['basketId'] ?? null)) {
return $response->withStatus(403)->withJson(['errors' => 'basketId param is not an integer']);
}
if (!Validator::intVal()->validate($args['resId'])) {
if (!Validator::intVal()->validate($args['resId'] ?? null)) {
return $response->withStatus(403)->withJson(['errors' => 'resId param is not an integer']);
}
......@@ -1317,9 +1317,9 @@ class ResController extends ResourceControlController
$listEventData = json_decode($groupBasket[0]['list_event_data'], true);
if (!!$listEventData['canUpdateData']) {
if (!empty($listEventData['canUpdateData'])) {
$status = StatusModel::getByResId(['select' => ['can_be_modified'], 'resId' => $args['resId'], 'collId' => 'letterbox_coll']);
if ($status['can_be_modified'] != 'Y') {
if (empty($status['can_be_modified']) || $status['can_be_modified'] != 'Y') {
$listEventData['canUpdateData'] = false;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment