diff --git a/src/DebugBar/Bridge/DoctrineCollector.php b/src/DebugBar/Bridge/DoctrineCollector.php index d33b7c9e..1482bd45 100644 --- a/src/DebugBar/Bridge/DoctrineCollector.php +++ b/src/DebugBar/Bridge/DoctrineCollector.php @@ -82,11 +82,16 @@ public function collect() */ public function getParameters($query) : array { - $params = []; - foreach ($query['params'] ?? [] as $name => $param) { - $params[$name] = htmlentities($param?:"", ENT_QUOTES, 'UTF-8', false); - } - return $params; + return array_map(function ($param) { + if (is_string($param)) { + return htmlentities($param, ENT_QUOTES, 'UTF-8', false); + } elseif (is_array($param)) { + return implode(', ', $param); + } elseif ($param instanceof \DateTimeInterface) { + return $param->format('Y-m-d H:i:s'); + } + return $param ?: ''; + }, $query['params'] ?? []); } /**