diff --git a/Database/Orm/Condition.php b/Database/Orm/Condition.php index 113e1398..765f1a73 100644 --- a/Database/Orm/Condition.php +++ b/Database/Orm/Condition.php @@ -81,13 +81,10 @@ trait Condition $_tmp = []; if (empty($where)) return ''; + var_dump($where); foreach ($where as $key => $value) { - if (is_string($key)) { - $_tmp = $this->conditionMap([$key, $value]); - break; - } - $_value = is_string($value) ? $value : $this->conditionMap($value); + if (empty($_value)) continue; $_tmp[] = $_value; diff --git a/Database/Traits/QueryTrait.php b/Database/Traits/QueryTrait.php index c8e42c57..5422c31b 100644 --- a/Database/Traits/QueryTrait.php +++ b/Database/Traits/QueryTrait.php @@ -730,7 +730,7 @@ trait QueryTrait */ public function where(callable|array|string $conditions): static { - $this->where[] = $conditions; + $this->where[] = [$conditions]; return $this; }