Skip to content

Commit 3f5cd3a

Browse files
committed
ConnectionPanel: simplified $source resolution
I’m not sure why it was so complicated before, but it didn’t work correctly.
1 parent 0781ba2 commit 3f5cd3a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Bridges/DatabaseTracy/ConnectionPanel.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,7 @@ private function logQuery(Connection $connection, $result): void
7575
? $result->getTrace()
7676
: debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
7777
foreach ($trace as $row) {
78-
if (
79-
(isset($row['file'])
80-
&& preg_match('~\.(php.?|phtml)$~', $row['file'])
81-
&& !$this->blueScreen->isCollapsed($row['file']))
82-
&& ($row['class'] ?? '') !== self::class
83-
&& !is_a($row['class'] ?? '', Connection::class, allow_string: true)
84-
) {
78+
if (preg_match('~\.(php.?|phtml)$~', $row['file'] ?? '') && !$this->blueScreen->isCollapsed($row['file'])) {
8579
$source = [$row['file'], (int) $row['line']];
8680
break;
8781
}

0 commit comments

Comments
 (0)