Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9d18913

Browse files
committed
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.
2 parents ac3111f + 6852a46 commit 9d18913

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,8 @@ public function startQuery($sql, array $params = null, array $types = null)
4949
$this->stopwatch->start('doctrine', 'doctrine');
5050
}
5151

52-
if (is_array($params)) {
53-
$params = $this->normalizeParams($params);
54-
}
55-
5652
if (null !== $this->logger) {
57-
$this->log($sql, null === $params ? array() : $params);
53+
$this->log($sql, null === $params ? array() : $this->normalizeParams($params));
5854
}
5955
}
6056

0 commit comments

Comments
 (0)