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); }