修复了在处理class_key和class_value时未检查是否为null的问题

This commit is contained in:
mkm 2024-05-27 10:00:32 +08:00
parent b9085c25f6
commit 35dd4b1140

View File

@ -23,12 +23,16 @@ trait ListsSearchTrait
}
$where = [];
$class_key=$this->request->__get('class_key');
foreach($class_key as $key => $value){
array_push($search[$key], $value); // 添加class_key的搜索条件
if($class_key!==null){
foreach($class_key as $key => $value){
array_push($search[$key], $value); // 添加class_key的搜索条件
}
}
$class_value=$this->request->__get('class_value'); // 获取class_value的值
if($class_value){
if($class_value!==null){
$this->params=array_merge($this->params,$class_value);
}
foreach ($search as $whereType => $whereFields) {
switch ($whereType) {