Browse Source

Fixed:遗漏的条件

zjh 1 month ago
parent
commit
d7c15e4661
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Driver/Entity/Base.php

+ 2 - 2
src/Driver/Entity/Base.php

@@ -275,7 +275,7 @@ class Base {
             if(is_callable($item['func'])) {
             if(is_callable($item['func'])) {
                 $subWhere = call_user_func($item['func'], $where, $item['args']);
                 $subWhere = call_user_func($item['func'], $where, $item['args']);
                 foreach ($subWhere as $key => $value) {
                 foreach ($subWhere as $key => $value) {
-                    if(!preg_match("/[0-9]/", $key) && is_array($value) && count($value, 1) != count($value)) {
+                    if(!preg_match("/^[0-9]/", $key) && is_array($value) && count($value, 1) != count($value)) {
                         foreach ($value as $k => $v) {
                         foreach ($value as $k => $v) {
                             if($this->alias != "") {
                             if($this->alias != "") {
                                 if(!preg_match("/^[a-zA-Z_]\./", $k)) {
                                 if(!preg_match("/^[a-zA-Z_]\./", $k)) {
@@ -292,7 +292,7 @@ class Base {
                         continue;
                         continue;
                     }
                     }
                     if($this->alias != "") {
                     if($this->alias != "") {
-                        if(!preg_match("/^[a-zA-Z_]\./", $key)) {
+                        if(!preg_match("/^[a-zA-Z_]\./", $key) && !preg_match("/^[0-9]/", $key)) {
                             $where[$this->alias . '.' . $key] = $value;
                             $where[$this->alias . '.' . $key] = $value;
                             unset($subWhere[$key]);
                             unset($subWhere[$key]);
                             unset($where[$key]);
                             unset($where[$key]);