Error log is filling up with the following message in MODX 3.0.3 and PHP 8.1…
[2023-03-24 11:33:37] (ERROR @ /var/www/vhosts/hos-tingdotcom/httpdocs/core/src/Revolution/Sources/modMediaSource.php : 2242) PHP warning: exif_read_data(my-image-name.png): File not supported
Same thing happening for me, with same versions.
It doesn’t happen with all images, in my case the problem was with an old PNG, created with Adobe ImageReady (or at least that’s what was in meta).
Have you guys implemented a solution at all ?
It’s happening to me too, on .webp images and the occasional .png as well.
I think I will need to fix it (even if it’s a hack) as I can’t allow the logs to get too bloated…
if you are asking for a solution, not to fill the the error log, you can try to set the systemsettings
log_level and debug to 0
Thank you but I’d like to know if anyone has a solution to fix the actual error?
It’s not really an error, just a warning that gets logged.
It occurs here in the code:
@ (the error control operator) in front of the function should suppress any errors.
You could add an
if statement to the code, to only run
exif_read_data for certain image types. There exists a variable
$ext with the image extension.