1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-17 05:18:32 +01:00

Show the real parameter name for prepared queries.

Array index works only with positioned (where foo = ?) parameters.
To make named (where foo = :baz) parameters debuggable the name must be defined as key.
This commit is contained in:
Reinhard Hiebl 2015-02-05 03:05:59 +01:00
parent df23eae5b6
commit 73dabc7296

View File

@ -132,8 +132,8 @@ class TracedStatement
public function getParameters()
{
$params = array();
foreach ($this->parameters as $param) {
$params[] = htmlentities($param, ENT_QUOTES, 'UTF-8', false);
foreach ($this->parameters as $name => $param) {
$params[$name] = htmlentities($param, ENT_QUOTES, 'UTF-8', false);
}
return $params;
}