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
[4.1] Do not throw a warning when the image url is null on clean #37888
Conversation
Nope, there should be a Notice in the source itself around the subform |
I can see this notice from PHP error logs. It comes from from our media form field. I wonder if we should fix the code which call this method instead? Shouldn't we only call the method if the url is not empty ? |
i've replicated the issue opening System -> Global Configuration cause of offline image |
What would be the advantage? |
Better code, save the system from having to execute unnecessary commands. It is logical that before displaying image, we check that the image is available before running more code to prepare data to display that image. |
Then make your own pr with your better code. I prefer to fix it on the source and make a stable library instead of telling everyone "please do the null check" when using this function. |
As this PR fixes it confirmed, I will merge it. |
Thx |
Summary of Changes
On PHP 8.1 a warning is displayed when the image to clean is null. This happens on empty media form fields.
Testing Instructions
Actual result BEFORE applying this Pull Request
A deprecated message is shown for images.
Expected result AFTER applying this Pull Request
No deprecated message.