1、and/$nor entries need to be full objects
在Mongo扩展 Buider.php parseWhere方法,加个判断
$filter[$logic][] = $this->parseWhere($query, $query->getOptions('where')); #改成 if ($query->getOptions('where')){ $filter[$logic][] = $this->parseWhere($query, $query->getOptions('where')); }
2、BSON field 'count.query' is the wrong type 'array', expected type 'object'
在Mongo扩展 Buider.php parseWhere方法
最后的输出前判断 给一个空对象
if (empty($filter)){ // 返回空对象 return (object)[]; }