Make WordPress Core


Ignore:
Timestamp:
01/15/2018 08:01:51 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Media: Bring consistency to getimagesize() error suppression.

Props chasewg, joemcgill, jeremyfelt.
Merges [42449] to the 4.9 branch.
Fixes #42480.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/includes/media.php

    r41964 r42450  
    356356
    357357    // Use image exif/iptc data for title and caption defaults if possible.
    358     } elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = @wp_read_image_metadata( $file ) ) {
     358    } elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = wp_read_image_metadata( $file ) ) {
    359359        if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) {
    360360            $title = $image_meta['title'];
     
    420420
    421421    // Use image exif/iptc data for title and caption defaults if possible.
    422     if ( $image_meta = @wp_read_image_metadata($file) ) {
     422    if ( $image_meta = wp_read_image_metadata( $file ) ) {
    423423        if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) )
    424424            $title = $image_meta['title'];
Note: See TracChangeset for help on using the changeset viewer.