diff --git a/extend/catcher/CatchQuery.php b/extend/catcher/CatchQuery.php index 9f49f70..e2d411c 100644 --- a/extend/catcher/CatchQuery.php +++ b/extend/catcher/CatchQuery.php @@ -118,7 +118,8 @@ class CatchQuery extends Query foreach ($params as $field => $value) { $method = 'search' . Str::studly($field) . 'Attr'; - if ($value !== null && method_exists($this->model, $method)) { + // value in [null, ''] + if ($value !== null && $value !== '' && method_exists($this->model, $method)) { $this->model->$method($this, $value, $params); } }