Skip to content

Commit 02bdb05

Browse files
authored
Fix Exception when QueryCollector softLimit exceeded (#1702)
The other match() case is: $query->connection->prepareBindings($query->bindings) This method always returns an array. Before this commit the match() case would return null, which is the wrong data type used downstream. This resulted in Exception: Debugbar exception: foreach() argument must be of type array|object, null given
1 parent cf7872b commit 02bdb05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DataCollector/QueryCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public function addQuery($query)
183183
}
184184

185185
$bindings = match (true) {
186-
$limited && filled($query->bindings) => null,
186+
$limited && filled($query->bindings) => [],
187187
default => $query->connection->prepareBindings($query->bindings),
188188
};
189189

0 commit comments

Comments
 (0)