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/deprecated.php

    r22431 r22463  
    32223222        $file = get_attached_file( $file );
    32233223
    3224     if ( ! file_exists( $file ) )
     3224    if ( ! is_file( $file ) )
    32253225        return sprintf(__('File “%s” doesn’t exist?'), $file);
    32263226
Note: See TracChangeset for help on using the changeset viewer.