X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FApiBundle%2FController%2FWallabagRestController.php;h=71da2a645ebd757309168277cdf8476565fcae67;hb=f808b01692a835673f328d7221ba8c212caa9b61;hp=b1e08ca441a00c578d6939cf5455728bc2035460;hpb=822c877949aff8ae57677671115f8f4fc69588d5;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index b1e08ca4..71da2a64 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php @@ -40,8 +40,8 @@ class WallabagRestController extends FOSRestController protected function validateUserAccess($requestUserId) { $user = $this->get('security.token_storage')->getToken()->getUser(); - if ($requestUserId != $user->getId()) { - throw $this->createAccessDeniedException('Access forbidden. Entry user id: '.$requestUserId.', logged user id: '.$user->getId()); + if ($requestUserId !== $user->getId()) { + throw $this->createAccessDeniedException('Access forbidden. Entry user id: ' . $requestUserId . ', logged user id: ' . $user->getId()); } } }