Skip to content

Commit

Permalink
Normalize db path on sqlite (barryvdh#1586)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored Mar 24, 2024
1 parent 44445f8 commit 3724600
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/DataCollector/QueryCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,10 @@ public function collect()
$totalTime += $query['time'];
$totalMemory += $query['memory'];

if (str_ends_with($query['connection'], '.sqlite')) {
$query['connection'] = $this->normalizeFilePath($query['connection']);
}

$statements[] = [
'sql' => $this->getDataFormatter()->formatSql($query['query']),
'type' => $query['type'],
Expand Down

0 comments on commit 3724600

Please sign in to comment.