From 834648941eeb87053360ea243ab592204298e308 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Fri, 9 Jun 2023 10:17:06 +0800 Subject: [PATCH] * Fix bug for search when whereCondition is empty. --- module/search/model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/search/model.php b/module/search/model.php index b5215b30ce..0431b8d236 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -718,6 +718,8 @@ class searchModel extends model if($this->config->db->driver == 'dm') { $whereCondition = preg_replace("/\b(AND|OR)\b/", "", $likeCondition, 1); + if(!$whereCondition) $whereCondition = '1=1'; + $scoreColumn = '*'; $orderBy = 'editedDate_desc'; }