• Hi,

    Two notices associated with the Mime.php class of webp-express occur while updating my plugins (i.e. /wp-admin/update-core.php page):

    1) Notice: exif_imagetype(): Read error! in C:\Users\simon\Local Sites\delforge\app\public\wpincludes\functions.php on line 3051

    2) Notice: Undefined variable: filePath in C:\Users\simon\Local Sites\delforge\app\public\wpcontent\plugins\webp-express\lib\classes\Mime.php on line 34

    The first notice occurs because of the wp function wp_get_image_type() call in the getMimeTypeOfMedia() method of Mime.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 be filename.

    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.