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

[8.x] Ensure $prefix is a string #36254

Merged
merged 3 commits into from
Feb 13, 2021
Merged

Conversation

kylekatarnls
Copy link
Contributor

Because PHP 8.1 will no longer allow it and throw:
rtrim(): Passing null to parameter #1 ($string) of type string is deprecated

Because PHP 8.1 will no longer allow it and throw:
`rtrim(): Passing null to parameter #1 ($string) of type string is deprecated`
@kylekatarnls
Copy link
Contributor Author

kylekatarnls commented Feb 13, 2021

To reproduce the error just run the following with last master PHP build:

new \Illuminate\Routing\Route('GET', '/foo', []);

It actually calls prefix(null) which makes me think the PHPDoc likely should have @param string|null $prefix if it's supposed to be a normal case.

@driesvints
Copy link
Member

@kylekatarnls I think we should fix the prefix call instead as this method shouldn't ever be passes a value of null

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.

3 participants