From 45ae8b51f19504ef67cd142ba5216688518aa87f Mon Sep 17 00:00:00 2001 From: Pierre Date: Sat, 27 May 2017 11:22:55 +0200 Subject: [PATCH] Fixed error in searchController --- RestControllers/searchController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RestControllers/searchController.php b/RestControllers/searchController.php index 22a3d37..c724224 100644 --- a/RestControllers/searchController.php +++ b/RestControllers/searchController.php @@ -25,7 +25,8 @@ class searchController Rest_fatal_error(401, "Invalid search limit !"); //Perform research on the database and return results - if(!$results = CS::get()->components->searchUser->search($_POST['query'], $searchLimit)) + $results = CS::get()->components->searchUser->search($_POST['query'], $searchLimit); + if($results === false) Rest_fatal_error(500, "An error occured while trying to perform a research in user list !"); //Return results