From 16113ed8b6f3001e435738895ac377d821e38663 Mon Sep 17 00:00:00 2001 From: Newt Date: Thu, 3 Oct 2024 22:46:42 +0100 Subject: [PATCH] fix(content warnings): included warnings not querying correctly --- app/Http/Controllers/BrowseController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/BrowseController.php b/app/Http/Controllers/BrowseController.php index 46bd765f4..2ca5ba5eb 100644 --- a/app/Http/Controllers/BrowseController.php +++ b/app/Http/Controllers/BrowseController.php @@ -435,8 +435,12 @@ private function handleMasterlistSearch(Request $request, $query, $imageQuery, $ } foreach ($includedTags as $tag) { - if ($image->content_warnings && in_array($tag, $image->content_warnings)) { - return true; + if ($image->content_warnings) { + foreach ($image->content_warnings as $warning) { + if (strtolower($warning) == strtolower($tag)) { + return true; + } + } } }