Skip to content

Fix php8.2 Deprecation warnings for strpos/preg_match/mb_strwidth in extractQueryString/extractQueryString/limit#57653

Closed
tivvie wants to merge 3 commits intolaravel:12.xfrom
tivvie:12.x
Closed

Fix php8.2 Deprecation warnings for strpos/preg_match/mb_strwidth in extractQueryString/extractQueryString/limit#57653
tivvie wants to merge 3 commits intolaravel:12.xfrom
tivvie:12.x

Conversation

@tivvie
Copy link
Copy Markdown

@tivvie tivvie commented Nov 3, 2025

Hello,

We log php deprecation warnings of our Laravel app in Sentry.
These fixes benefit us that we don't recive them anymore.
As soon as PHP removes this functionality in the next version, a fix will be needed.

My code does not introduce any side effects. (hopefully)
If i missed somthing please contact me.

Thanks!
Timothy Elias

 -  Passing null to parameter laravel#1 ($haystack) of type string is deprecated
-  Passing null to parameter laravel#2 ($subject) of type string is deprecated
- Passing null to parameter laravel#1 ($string) of type string is deprecated
- add test
@taylorotwell
Copy link
Copy Markdown
Member

You shouldn't be passing null to these methods.

@cweiske
Copy link
Copy Markdown

cweiske commented Nov 3, 2025

So we have to litter blade templates with $var ?? '' fallbacks.

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