ParameterBag::filter does not return default null #60520
Unanswered
macropay-solutions
asked this question in
Q&A
Replies: 1 comment
-
This seems like a (documentation?) bug indeed; you should probably open an issue about that. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
symfony/src/Symfony/Component/HttpFoundation/ParameterBag.php
Line 206 in cb08480
This will never return null as default when called like:
$parameterBag->filter('key');
because
filter_var(null, FILTER_DEFAULT)
is returning string.
We noticed this when we implemented getFiltered macro.
So the $default param being by default null is conflicting with this.
Maybe a better dockblock for that default could help understand this from start.
Beta Was this translation helpful? Give feedback.
All reactions