Make WordPress Core


Ignore:
Timestamp:
11/08/2012 02:02:03 AM (11 years ago)
Author:
nacin
Message:

In WP_Image_Editor / wp_load_image(), use is_file() rather than file_exists() so we do not accidentally load a directory.

props benkulbertis, DH-Shredder, scribu.
fixes #17814.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-image-editor-gd.php

    r22420 r22463  
    5252            return true;
    5353
    54         if ( ! file_exists( $this->file ) )
     54        if ( ! is_file( $this->file ) )
    5555            return new WP_Error( 'error_loading_image', __('File doesn’t exist?'), $this->file );
    5656
Note: See TracChangeset for help on using the changeset viewer.