Skip to content

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

Merged
taylorotwell merged 1 commit into
9.xfrom
fix-server-issue
Apr 12, 2022
Merged

[9.x] Fix empty paths for server.php#41933
taylorotwell merged 1 commit into
9.xfrom
fix-server-issue

Conversation

@driesvints

Copy link
Copy Markdown
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