minor #17364 [Bridge] [Doctrine] Normalize params only when used. [2.3] (SpacePossum)
This PR was merged into the 2.3 branch.
Discussion
----------
[Bridge] [Doctrine] Normalize params only when used. [2.3]
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
If no logger is set the params are not used so those don't have to be normalized.
Commits
-------
6852a46
Normalize params only when used.
This commit is contained in:
commit
9d189137e3
@ -49,12 +49,8 @@ class DbalLogger implements SQLLogger
|
|||||||
$this->stopwatch->start('doctrine', 'doctrine');
|
$this->stopwatch->start('doctrine', 'doctrine');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($params)) {
|
|
||||||
$params = $this->normalizeParams($params);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null !== $this->logger) {
|
if (null !== $this->logger) {
|
||||||
$this->log($sql, null === $params ? array() : $params);
|
$this->log($sql, null === $params ? array() : $this->normalizeParams($params));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user