From 245542e97270edb24b9661ddb1117dec6dca1f66 Mon Sep 17 00:00:00 2001 From: mayue Date: Fri, 25 Feb 2022 14:00:54 +0800 Subject: [PATCH] * Optimize code. --- module/search/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/search/model.php b/module/search/model.php index de5c5faf70..92a7c785b2 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -176,7 +176,7 @@ class searchModel extends model if($operator == 'between' and !isset($this->config->search->dynamic[$value])) $operator = '='; $condition = $operator . ' ' . $this->dbh->quote($value) . ' '; - if($operator == '=' and $this->post->$fieldName == 'id' and preg_match('/^[0-9]+(,[0-9]+)+/', $value)) + if($operator == '=' and $this->post->$fieldName == 'id' and preg_match('/^[0-9]+(,[0-9]+)+/', $value) and !preg_match('/[\x00-\xff]+/', $value)) { $values = explode(',', trim($this->dbh->quote($value), "'")); foreach($values as $value)