From 1bca59fe6663d5bc8c5e0d59505491b8064dd258 Mon Sep 17 00:00:00 2001
From: erikn69 <erikn_69@hotmail.com>
Date: Wed, 11 Sep 2024 13:12:52 -0500
Subject: [PATCH] Fix #681 (#682)

---
 src/DebugBar/Bridge/DoctrineCollector.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/DebugBar/Bridge/DoctrineCollector.php b/src/DebugBar/Bridge/DoctrineCollector.php
index 2eea280..f5cf0f0 100644
--- a/src/DebugBar/Bridge/DoctrineCollector.php
+++ b/src/DebugBar/Bridge/DoctrineCollector.php
@@ -60,7 +60,7 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid
         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 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid
      *
      * @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 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid
                 return json_encode($param);
             }
             return $param ?: '';
-        }, $query['params'] ?? []);
+        }, $params);
     }
 
     /**