Skip to content

Commit 99d2b80

Browse files
committed
avoid undefined file key
1 parent d5057cd commit 99d2b80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/QueryLogger/QueryLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ protected function guessCallSpot(): array
115115
$vendor = \DIRECTORY_SEPARATOR . 'vendor' . \DIRECTORY_SEPARATOR;
116116

117117
foreach ($stack as $trace) {
118-
if (! \str_contains($trace['file'], $vendor)) {
118+
if (\array_key_exists('file', $trace) && ! \str_contains($trace['file'], $vendor)) {
119119
return Arr::only($trace, ['file', 'line', 'function']);
120120
}
121121
}

0 commit comments

Comments
 (0)