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 Deprecation - fnmatch(): Passing null to parameter #2 ($filename) of type string is deprecated #13270
Comments
This code got rid of the error in the logs. The error message indicates that passing null as the $filename parameter to the fnmatch() function is deprecated. This is happening because the $origin variable may be null in some cases. To fix this error, you can add a check to ensure that $origin is not null before calling fnmatch(). Here's an updated version of the code:
This adds an additional check to ensure that $origin is not null before calling fnmatch(). If $origin is null, the filter will return false and the function will continue as before. |
I just setup a new Mautic install for production and our logs are filled with this deprecation notice. |
Looks like we have a fix in #13270 folks - please check and test, and remember to leave your review! Docs here for how to review & test: https://mau.tc/tester (you can do it in the browser using Gitpod). Thanks in advance for helping get this into a future release of Mautic! |
* If $origin is null, return false. Fixes issue #13270. Credit to @J-Wick4. * Yoda style coding standards. * Change return value to null to match @return annotation Co-authored-by: John Linhart <jan@linhart.email> --------- Co-authored-by: John Linhart <jan@linhart.email> Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>
|
Mautic Version
5.0.x series
PHP version
8.1.27
What browsers are you seeing the problem on?
Firefox
What happened?
After visit the login pages it creates journal entry in the error_log what is in installation root folder.
Mautic version: 5.0.2
How can we reproduce this issue?
Open login url: /s/login
Relevant log output
Code of Conduct
Care about this issue? Want to get it resolved sooner? If you are a member of Mautic, you can add some funds to the Bounties Project so that the person who completes this task can claim those funds once it is merged by a member of the core team! Read the docs here.
The text was updated successfully, but these errors were encountered: