From 5c080bf379152ee0908c35c9d79f294da58e37a6 Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 9 Sep 2024 12:13:17 +0200 Subject: [PATCH] [search] avoid division by zero --- include/search_filters.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/search_filters.inc.php b/include/search_filters.inc.php index b75cc98b4..b9fcf4d5a 100644 --- a/include/search_filters.inc.php +++ b/include/search_filters.inc.php @@ -505,6 +505,11 @@ SELECT foreach ($filter_rows as $row) { + if ($row['width'] <= 0 and $row['height'] <= 0) + { + continue; + } + $r = $row['width'] / $row['height']; if ($r < 0.95) {