Closed pereorga closed 6 years ago
@qex what do you think?
This is hard to do, you need to change the logic of sanitizeString($_GET['f']) !== $_GET['f']
.
that can be done, and will make code a little harder to read I think.
Oh my mistake, I didn't notice this is a PR so I didn't see your code ...
you made the point, it is a clever move!
what if change if ( isset( $_GET['f'] ) ...
line into
if ( isset($_GET['f']) && preg_match('/^[a-z0-9]+$/i', $_GET['f'] ) ) {
then you can just put !strlen()
section into else, no need to pre-define an empty $name.
That makes sense!
You can remove the two new branch auto-generate by this PR make the project clean.
Thanks again!