Make WordPress Core


Ignore:
Timestamp:
11/08/2012 02:02:03 AM (12 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-imagick.php

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