[Bridge] [Doctrine] Normalize params only when used. [2.3]#17364
Conversation
|
👍 |
There was a problem hiding this comment.
What if $params is no array (this was checked before)?
There was a problem hiding this comment.
If $params is not an array and not null; PHP will raise a fatal error because the function signature states array (with default null).
sth like;
PHP Catchable fatal error: Argument 2 passed to startQuery() must be of the type array, integer given, ...
so the test for array and later on for null was overcomplete AFAIK
There was a problem hiding this comment.
What I mean is that $params can indeed be null here but normalizeParams() doesn't handle null.
There was a problem hiding this comment.
if $params is null it is not given to normalizeParams, I'm not sure if I follow?
There was a problem hiding this comment.
Oh sorry, I missed the null === $params check.
There was a problem hiding this comment.
👍 thanks for the review :)
|
👍 Status: Reviewed |
|
Thank you @SpacePossum. |
…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.
If no logger is set the params are not used so those don't have to be normalized.