Read Error! and Undefined variable in Mime.php class
-
Hi,
Two notices associated with the
Mime.phpclass of webp-express occur while updating my plugins (i.e./wp-admin/update-core.phppage):1)
Notice: exif_imagetype(): Read error! in C:\Users\simon\Local Sites\delforge\app\public\wpincludes\functions.php on line 30512)
Notice: Undefined variable: filePath in C:\Users\simon\Local Sites\delforge\app\public\wpcontent\plugins\webp-express\lib\classes\Mime.php on line 34The first notice occurs because of the wp function
wp_get_image_type()call in thegetMimeTypeOfMedia()method ofMime.php. On https://www.php.net/manual/fr/function.exif-imagetype.php, one can read:By trial and error, it seems that a file has to be 12 bytes or larger in order to avoid a “Read error!”.
Would the proposed work-around be a solution?
The second notice occurs because of the undefined variable
filePath. It looks like this variable should actually befilename.I can provide the pdf with the full notices call stacks if needed.
Best regards,
Simon.
The topic ‘Read Error! and Undefined variable in Mime.php class’ is closed to new replies.