-
Notifications
You must be signed in to change notification settings - Fork 129
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
PHP 8.1 Deprecated messages #466
Comments
Thanks! We'll take a look. |
I did some investigations and it appears the issue appears on line #362 (where @aglipanci also said) but after fixing that, it appears again on line #320. So the issue appears to be something that's PHP 8.1 related as the $subject no longer accepts null as a parameter. So the quickfix would be to just replace So basically just replace (line 362): if ($stripPathRegex && @preg_match($stripPathRegex, null) === false) { with if ($stripPathRegex && @preg_match($stripPathRegex, '') === false) { AND (line 320) if ($projectRootRegex && @preg_match($projectRootRegex, null) === false) { with if ($projectRootRegex && @preg_match($projectRootRegex, '') === false) { |
Any ideas?? |
Can you fix it at last? |
I'll take a look. I think this should be an easy fix. |
I haven't been able to reproduce this in a new Laravel project, other than in the We will fix this specific deprecation, but that doesn't solve the whole issue. The reason we're using the error suppression operator is to suppress warnings that may be raised when passing an invalid regex to Can you confirm if the Tinker REPL where you're seeing these deprecations? If not, it'd be useful to know what is logging them because it will be caused by a bug in an error handler. Laravel's error handler does handle this correctly, so it's likely to be a third party package rather than Laravel directly |
It depends on your default error level. In any case, we should not calling code in a deprecated way. |
PHP 8.1 Deprecated messages
PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/html/vendor/bugsnag/bugsnag/src/Configuration.php on line 362
Steps to reproduce
Environment
The text was updated successfully, but these errors were encountered: