From bff196207195b4416e4c33dc3c829699d1cfacbb Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 10 Dec 2023 22:15:59 +0200 Subject: [PATCH] undefined variable --- src/Controller/SearchController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Controller/SearchController.php b/src/Controller/SearchController.php index caa3848..8cb63bc 100644 --- a/src/Controller/SearchController.php +++ b/src/Controller/SearchController.php @@ -24,6 +24,7 @@ class SearchController extends AbstractController // Defaults $locales = []; $categories = []; + $sensitive = []; // Request $query = $request->get('query') ? urldecode($request->get('query')) : ''; @@ -65,7 +66,7 @@ class SearchController extends AbstractController $keywords, [$locale], $request->get('categories') ? $request->get('categories') : $user->getCategories(), - $sensitive, + $request->get('sensitive') ? null : false, !$user->isModerator() ? true : null, !$user->isModerator() ? true : null, ) @@ -94,7 +95,7 @@ class SearchController extends AbstractController $keywords, $request->get('locales') ? $request->get('locales') : $user->getLocales(), [$category], - $sensitive, + $request->get('sensitive') ? null : false, !$user->isModerator() ? true : null, !$user->isModerator() ? true : null, )