User tests: Successful: Unsuccessful:
On PHP 8.1 a warning is displayed when the image to clean is null. This happens on empty media form fields.
A deprecated message is shown for images.
No deprecated message.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
PHP 8.x
|
Labels |
Added:
?
|
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
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 ?
What would be the advantage?
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.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-06-18 10:04:03 |
Closed_By | ⇒ | bembelimen |
Thx
did you mean this ?