Skip to content
Snippets Groups Projects
Commit f11ffd54 authored by chaerla's avatar chaerla
Browse files

fix: check for null body in put req

parent 718af619
Branches
Tags
1 merge request!8Curators
......@@ -89,7 +89,6 @@ class ReviewsController extends Controller {
$reviewsData = $this->filmReviewService->getUserReviews($userId, $options);
return $this->renderComponent('review-list', array_merge($reviewsData, ['currentPage' => $options['page'], 'pageSize' => 5]));
}
/**
* @throws NotFoundException
*/
......
......@@ -63,8 +63,10 @@ class Request
fclose($putStream);
$putJson = json_decode($putData);
foreach($putJson as $key => $value){
$data[$key] = filter_var($value, FILTER_SANITIZE_SPECIAL_CHARS);
if ($putJson!=null){
foreach($putJson as $key => $value){
$data[$key] = filter_var($value, FILTER_SANITIZE_SPECIAL_CHARS);
}
}
}
return $data;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment