Bug in function wp_read_image_metadata() in image.php (3 posts)

  1. Kerfred
    Posted 3 years ago #

    During image upload, I get the following warning :

    Warning: trim() expects parameter 1 to be string, array given in /wp-admin/includes/image.php on line 300

    The line 300 is:
    $meta['iso'] = utf8_encode( trim( $exif['ISOSpeedRatings'] ) );

    The error is that $exif['ISOSpeedRatings'] can be an array, for example Array ( [0] => 200 [1] => 200 ). So the trim() function returns the warning.

  2. willy4987
    Posted 2 years ago #

    so how to fix this

  3. Kerfred
    Posted 2 years ago #

    Hope that the WordPress team will fix it in the next release.

Topic Closed

This topic has been closed to new replies.

About this Topic