-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
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
filter_input types too generic #9760
Labels
easy problems
Issues that can be fixed without background knowledge of Psalm
enhancement
good first issue
Help wanted
internal stubs/callmap
Comments
I found these snippets: https://psalm.dev/r/10b253ba58<?php
$tmp1 = filter_input( INPUT_SERVER, 'QUERY_STRING', FILTER_SANITIZE_URL );
/** @psalm-trace $tmp1 */;
$tmp2 = $_SERVER['QUERY_STRING'];
/** @psalm-trace $tmp2 */;
https://psalm.dev/r/5b0fa23243<?php
if ( isset( $_SERVER['QUERY_STRING'] ) ) {
$tmp1 = filter_input( INPUT_SERVER, 'QUERY_STRING', FILTER_SANITIZE_URL );
/** @psalm-trace $tmp1 */;
$tmp2 = $_SERVER['QUERY_STRING'];
/** @psalm-trace $tmp2 */;
}
|
that would make sense :) |
orklah
added
enhancement
easy problems
Issues that can be fixed without background knowledge of Psalm
internal stubs/callmap
Help wanted
good first issue
labels
May 9, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
easy problems
Issues that can be fixed without background knowledge of Psalm
enhancement
good first issue
Help wanted
internal stubs/callmap
https://psalm.dev/r/10b253ba58
filter_input
types are extremely generic and should be updated so they work like the superglobals ($_SERVER
,...) already do.e.g. it should be
false|null|string
hereIn this case https://psalm.dev/r/5b0fa23243 it should just be
string
The text was updated successfully, but these errors were encountered: