diff --git wp-includes/class-wp-image-editor-gd.php wp-includes/class-wp-image-editor-gd.php
index 94c2eec..a72648a 100644
|
|
|
class WP_Image_Editor_GD extends WP_Image_Editor { |
| 51 | 51 | if ( $this->image ) |
| 52 | 52 | return true; |
| 53 | 53 | |
| 54 | | if ( ! file_exists( $this->file ) ) |
| | 54 | if ( ! file_exists( $this->file ) || ! is_file( $this->file ) ) |
| 55 | 55 | return new WP_Error( 'error_loading_image', __('File doesn’t exist?'), $this->file ); |
| 56 | 56 | |
| 57 | 57 | // Set artificially high because GD uses uncompressed images in memory |
diff --git wp-includes/class-wp-image-editor-imagick.php wp-includes/class-wp-image-editor-imagick.php
index 6370a53..c8cb964 100644
|
|
|
class WP_Image_Editor_Imagick extends WP_Image_Editor { |
| 52 | 52 | if ( $this->image ) |
| 53 | 53 | return true; |
| 54 | 54 | |
| 55 | | if ( ! file_exists( $this->file ) ) |
| | 55 | if ( ! file_exists( $this->file ) || ! is_file( $this->file ) ) |
| 56 | 56 | return new WP_Error( 'error_loading_image', __('File doesn’t exist?'), $this->file ); |
| 57 | 57 | |
| 58 | 58 | try { |
diff --git wp-includes/deprecated.php wp-includes/deprecated.php
index a9744e8..a1d86d2 100644
|
|
|
function wp_load_image( $file ) { |
| 3221 | 3221 | if ( is_numeric( $file ) ) |
| 3222 | 3222 | $file = get_attached_file( $file ); |
| 3223 | 3223 | |
| 3224 | | if ( ! file_exists( $file ) ) |
| | 3224 | if ( ! file_exists( $file ) || ! is_file( $file ) ) |
| 3225 | 3225 | return sprintf(__('File “%s” doesn’t exist?'), $file); |
| 3226 | 3226 | |
| 3227 | 3227 | if ( ! function_exists('imagecreatefromstring') ) |