Skip to content

Commit

Permalink
ConnectionPanel: simplified $source resolution
Browse files Browse the repository at this point in the history
I’m not sure why it was so complicated before, but it didn’t work correctly.
  • Loading branch information
dg committed Jan 12, 2025
1 parent 58a448d commit c4856af
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Bridges/DatabaseTracy/ConnectionPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,7 @@ private function logQuery(Connection $connection, $result): void
? $result->getTrace()
: debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
foreach ($trace as $row) {
if (
(isset($row['file'])
&& preg_match('~\.(php.?|phtml)$~', $row['file'])
&& !$this->blueScreen->isCollapsed($row['file']))
&& ($row['class'] ?? '') !== self::class
&& !is_a($row['class'] ?? '', Connection::class, allow_string: true)
) {
if (preg_match('~\.(php.?|phtml)$~', $row['file'] ?? '') && !$this->blueScreen->isCollapsed($row['file'])) {
$source = [$row['file'], (int) $row['line']];
break;
}
Expand Down

0 comments on commit c4856af

Please sign in to comment.