From b87480a029c9d3c51e87e4d3cdb615f8fa3143e0 Mon Sep 17 00:00:00 2001 From: ebakernz Date: Tue, 6 Dec 2022 11:30:27 +1300 Subject: [PATCH] fix for null query (#20) Co-authored-by: ebakernz --- src/SearchPageController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SearchPageController.php b/src/SearchPageController.php index 688e6e7..f9b4b72 100755 --- a/src/SearchPageController.php +++ b/src/SearchPageController.php @@ -162,7 +162,7 @@ public static function get_mapped_filters(){ public static function get_query($mysqlSafe = false){ $query = self::$query; if ($query) { - if ($mysqlSafe) { + if ($mysqlSafe && $query) { $query = str_replace("'", "\'", $query); $query = str_replace('"', '\"', $query); $query = str_replace('`', '\`', $query);