Title: Bug in function wp_read_image_metadata() in image.php
Last modified: August 20, 2016

---

# Bug in function wp_read_image_metadata() in image.php

 *  [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/bug-in-function-wp_read_image_metadata-in-imagephp/)
 * 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.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [willy4987](https://wordpress.org/support/users/willy4987/)
 * (@willy4987)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/bug-in-function-wp_read_image_metadata-in-imagephp/#post-2597976)
 * so how to fix this
 *  Thread Starter [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/bug-in-function-wp_read_image_metadata-in-imagephp/#post-2597977)
 * Hope that the WordPress team will fix it in the next release.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Bug in function wp_read_image_metadata() in image.php’ is closed to new
replies.

## Tags

 * [exif_read_data](https://wordpress.org/support/topic-tag/exif_read_data/)
 * [trim](https://wordpress.org/support/topic-tag/trim/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Kerfred](https://wordpress.org/support/users/kerfred/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/bug-in-function-wp_read_image_metadata-in-imagephp/#post-2597977)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
