diff --git a/src/Db/Query/Where/WhereBrackets.php b/src/Db/Query/Where/WhereBrackets.php index 544e0bea3..30d1f37bd 100644 --- a/src/Db/Query/Where/WhereBrackets.php +++ b/src/Db/Query/Where/WhereBrackets.php @@ -8,6 +8,7 @@ use Imi\Db\Query\Interfaces\IBaseWhere; use Imi\Db\Query\Interfaces\IQuery; use Imi\Db\Query\Interfaces\IWhereBrackets; +use Imi\Db\Query\Interfaces\IWhereCollector; use Imi\Db\Query\Traits\TRaw; use Imi\Db\Query\WhereCollector; @@ -97,7 +98,7 @@ public function toStringWithoutLogic(IQuery $query): string return '(' . $result . ')'; } - elseif (null === $callResult) + elseif (null === $callResult || $callResult instanceof IWhereCollector) { $result = '('; foreach ([