Skip to content

Commit 611c2d1

Browse files
authored
Update QueryCollector.php fix issue #1775 (#1776)
Test for null value in strpos in QueryCollector.php to solve laravel-debugbar issue #1775 and snipe-it issue 16476.
1 parent dff0932 commit 611c2d1

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
@@ -378,7 +378,7 @@ protected function findMiddlewareFromFile($file)
378378
$filename = pathinfo($file, PATHINFO_FILENAME);
379379

380380
foreach ($this->middleware as $alias => $class) {
381-
if (strpos($class, $filename) !== false) {
381+
if (!is_null($class) && !is_null($filename) && strpos($class, $filename) !== false) {
382382
return $alias;
383383
}
384384
}

0 commit comments

Comments
 (0)