Make WordPress Core


Ignore:
Timestamp:
01/15/2018 07:43:30 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Media: Bring consistency to getimagesize() error suppression.

Props chasewg, joemcgill, jeremyfelt.
Fixes #42480.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/media.php

    r42343 r42449  
    369369        }
    370370
    371         // Use image exif/iptc data for title and caption defaults if possible.
    372     } elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = @wp_read_image_metadata( $file ) ) {
     371    // Use image exif/iptc data for title and caption defaults if possible.
     372    } elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = wp_read_image_metadata( $file ) ) {
    373373        if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) {
    374374            $title = $image_meta['title'];
     
    438438
    439439    // Use image exif/iptc data for title and caption defaults if possible.
    440     if ( $image_meta = @wp_read_image_metadata( $file ) ) {
     440    if ( $image_meta = wp_read_image_metadata( $file ) ) {
    441441        if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) {
    442442            $title = $image_meta['title'];
Note: See TracChangeset for help on using the changeset viewer.