* Optimize code.

This commit is contained in:
mayue
2022-02-25 14:00:54 +08:00
parent c763f12188
commit 245542e972
+1 -1
View File
@@ -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)