Skip to content

Commit

Permalink
Fix #681 (#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored Sep 11, 2024
1 parent bac7342 commit 1bca59f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DebugBar/Bridge/DoctrineCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function collect()
foreach ($this->debugStack->queries as $q) {
$queries[] = array(
'sql' => $q['sql'],
'params' => (object) $this->getParameters($q),
'params' => (object) $this->getParameters($q['params'] ?? []),
'duration' => $q['executionMS'],
'duration_str' => $this->formatDuration($q['executionMS'])
);
Expand All @@ -80,7 +80,7 @@ public function collect()
*
* @return array
*/
public function getParameters($query) : array
public function getParameters($params) : array
{
return array_map(function ($param) {
if (is_string($param)) {
Expand All @@ -95,7 +95,7 @@ public function getParameters($query) : array
return json_encode($param);
}
return $param ?: '';
}, $query['params'] ?? []);
}, $params);
}

/**
Expand Down

0 comments on commit 1bca59f

Please sign in to comment.