Skip to content

Commit 308eba2

Browse files
committed
Check for object key existence
1 parent 8b7e0e6 commit 308eba2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/QueryDetector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function logQuery($query, Collection $backtrace)
5555
});
5656

5757
// We try to access a relation
58-
if (is_array($relation)) {
58+
if (is_array($relation) && isset($relation['object'])) {
5959
if ($relation['class'] === Relation::class) {
6060
$model = get_class($relation['object']->getParent());
6161
$relationName = get_class($relation['object']->getRelated());

0 commit comments

Comments
 (0)