Skip to content

Commit

Permalink
Fix array to string converstion (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored Sep 11, 2024
1 parent b210445 commit bac7342
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DebugBar/Bridge/DoctrineCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,13 @@ public function getParameters($query) : array
if (is_string($param)) {
return htmlentities($param, ENT_QUOTES, 'UTF-8', false);
} elseif (is_array($param)) {
return implode(', ', $param);
return '[' . implode(', ', $this->getParameters($param)) . ']';
} elseif (is_numeric($param)) {
return strval($param);
} elseif ($param instanceof \DateTimeInterface) {
return $param->format('Y-m-d H:i:s');
} elseif (is_object($param)) {
return json_encode($param);
}
return $param ?: '';
}, $query['params'] ?? []);
Expand Down

0 comments on commit bac7342

Please sign in to comment.