Skip to content
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

[10.x] Address Null Parameter Deprecations in UrlGenerator #51148

Merged

Conversation

aldobarr
Copy link
Contributor

@aldobarr aldobarr commented Apr 20, 2024

UrlGenerator can currently receive a null value for $path in isValidUrl and extractQueryString which leads to null being passed to preg_match and strpos respectively which is deprecated.

Resolves #51147

Replace null values with empty strings for preg_match.
@rodrigopedra
Copy link
Contributor

Both methods' docblocks state that they expect a string.

You can see numerous PR trying to account for nulls like this.

If the deprecation notice is triggered by an internal call of those methods, then the call should be fixed, not the implementation to account for unexpected usage.

Change default header get to empty string.
@aldobarr
Copy link
Contributor Author

Both methods' docblocks state that they expect a string.

You can see numerous PR trying to account for nulls like this.

If the deprecation notice is triggered by an internal call of those methods, then the call should be fixed, not the implementation to account for unexpected usage.

Updated PR to fix the specific ones I found earlier.

@taylorotwell taylorotwell merged commit 25e285e into laravel:10.x Apr 22, 2024
24 checks passed
@aldobarr aldobarr deleted the bugfix/url-generator-null-deprecations branch April 22, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants