-
Notifications
You must be signed in to change notification settings - Fork 16
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
Ensure PHP's urldecode is not NULL #136
Comments
Can you detail the replication steps please? I'd like to understand why the exceptional cases are failing, rather than bury the error. |
The error happens when
Example - https://3v4l.org/p6tvt On a sidenote, it looks like these two variables are unused in the function - WPCOM-Legacy-Redirector/includes/class-lookup.php Lines 105 to 106 in 69a7634
|
|
Thanks @Nikschavan . Do you think adding a check of |
IMO, yes if |
Would you like to open a PR for it? I don't know when we'll do a release, so you may need to do the same fix locally, knowing that when there is a release the fix will be included. |
I have created a pull request #137 We are using the plugin's development branch as we need UI in a project. Once the PR is merged, we can update it to the latest commit pin. Thank you! |
#137 has now been merged. |
The plugin uses PHP's
urldecode
function in a few places. If an empty string is passed to this function, a deprecation warning is returned:The two places where warnings appear are:
https://github.com/Automattic/WPCOM-Legacy-Redirector/blob/develop/includes/class-utils.php#L29-L36
https://github.com/Automattic/WPCOM-Legacy-Redirector/blob/develop/includes/class-utils.php#L49
Should we add
is_empty()
checks to$matches
and$url
respectively? The WordPresswp_parse_url
should always return "false" or an array, but clearly that is not always happening.The text was updated successfully, but these errors were encountered: