Skip to content

fix trim null arg deprecation #55649

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

Merged
merged 1 commit into from
May 5, 2025
Merged

fix trim null arg deprecation #55649

merged 1 commit into from
May 5, 2025

Conversation

apreiml
Copy link
Contributor

@apreiml apreiml commented May 5, 2025

Avoid passing null as $string arg, because it causes a deprecation warning in php 8.6.4.

@realodix
Copy link

realodix commented May 5, 2025

Avoid passing null as $string arg, because it causes a deprecation warning in php 8.6.4.

PHP 8.4.6 ?

Copy link
Member

@GrahamCampbell GrahamCampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change doesn't do anything because driver is never null by that point due to the very first line of the function.

Copy link
Member

@GrahamCampbell GrahamCampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, though getDefaultDriver has a bug where it can return null. code that calls parseDriver and getDefaultDriver assumes the result is non-null, even though the phpdoc return type says otherwise.

@taylorotwell taylorotwell merged commit 25ba38e into laravel:12.x May 5, 2025
60 checks passed
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.

4 participants