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

[9.x] Fix empty paths for server.php #41933

Merged
merged 1 commit into from
Apr 12, 2022
Merged

[9.x] Fix empty paths for server.php #41933

merged 1 commit into from
Apr 12, 2022

Conversation

driesvints
Copy link
Member

This PR fixes an issue where an url has an empty path segment and a non-trailing slash ending. When using artisan serve, the urlencode function in server.php will receive null which isn't valid anymore on PHP 8.1.
Instead, what we'll do is pass an empty string if that happens. Since the url couldn't be parsed, we give an empty string, which is an url that will definitely not exist (root is /) and it will properly show the 404
page.

Fixes #41929

@driesvints driesvints changed the title Fix empty paths for server.php [9.x] Fix empty paths for server.php Apr 12, 2022
@taylorotwell taylorotwell merged commit bd3ac84 into 9.x Apr 12, 2022
@taylorotwell taylorotwell deleted the fix-server-issue branch April 12, 2022 13:38
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.

Deprecated: urldecode(): Passing null to parameter #1 ($string) of type string is deprecated
2 participants