diff --git a/src/DebugBar/Bridge/DoctrineCollector.php b/src/DebugBar/Bridge/DoctrineCollector.php index 2eea2804..f5cf0f00 100644 --- a/src/DebugBar/Bridge/DoctrineCollector.php +++ b/src/DebugBar/Bridge/DoctrineCollector.php @@ -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']) ); @@ -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)) { @@ -95,7 +95,7 @@ public function getParameters($query) : array return json_encode($param); } return $param ?: ''; - }, $query['params'] ?? []); + }, $params); } /**