From c8bd5e8d493d71eb2791ed76145dfc0b3a2eea9c Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 25 Oct 2020 13:09:51 +0000 Subject: [PATCH] clarity for not-emptiness --- core/imageboard/image.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/imageboard/image.php b/core/imageboard/image.php index 3e239206..dc5cb405 100644 --- a/core/imageboard/image.php +++ b/core/imageboard/image.php @@ -289,7 +289,7 @@ class Image $stpe = send_event(new SearchTermParseEvent($stpen++, null, $terms)); if ($stpe->order) { $order = $stpe->order; - } elseif ($stpe->querylets) { + } elseif (!empty($stpe->querylets)) { foreach ($stpe->querylets as $querylet) { $img_conditions[] = new ImgCondition($querylet, true); } @@ -309,7 +309,7 @@ class Image $stpe = send_event(new SearchTermParseEvent($stpen++, $term, $terms)); if ($stpe->order) { $order = $stpe->order; - } elseif ($stpe->querylets) { + } elseif (!empty($stpe->querylets)) { foreach ($stpe->querylets as $querylet) { $img_conditions[] = new ImgCondition($querylet, $positive); }