We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_bool_from_string()
I'm no PHP expert!
Shouldn't "true" and "false" be added to get_bool_from_string()?
"true"
"false"
function get_bool_from_string($value) { if (is_bool($value) || is_null($value)) { return $value; } switch (strtolower($value)) { case 'true': // here case 'yes': case 'y': case 'on': case '1': return true; break; case 'false': // and here case 'no': case 'n': case 'off': case '0': return false; break; default: return null; break; } }
I'm thinking on the case of a boolean being submitted as string.
The text was updated successfully, but these errors were encountered:
Improve string-to-boolean conversion; #1959
ea634e0
Support 'true' and 'false' in get_bool_from_string() function PSR-12 boot.common.php
dd144fd
Successfully merging a pull request may close this issue.
I'm no PHP expert!
Shouldn't
"true"
and"false"
be added to get_bool_from_string()?I'm thinking on the case of a boolean being submitted as string.
The text was updated successfully, but these errors were encountered: