WordPress.org

Make WordPress Core

Ticket #17814: media-17814.php.patch

File media-17814.php.patch, 859 bytes (added by benkulbertis, 7 years ago)

added is_file check to wp_load_image()

  • .php

    old new  
    246246        if ( ! file_exists( $file ) )
    247247                return sprintf(__('File “%s” doesn’t exist?'), $file);
    248248
     249        if( ! is_file( $file ) )
     250                return sprintf(__('“%s” is not a file.'), $file);
     251
    249252        if ( ! function_exists('imagecreatefromstring') )
    250253                return __('The GD image library is not installed.');
    251254
     
    14381441        return apply_filters( 'embed_googlevideo', '<embed type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docid=' . esc_attr($matches[2]) . '&amp;hl=en&amp;fs=true" style="width:' . esc_attr($width) . 'px;height:' . esc_attr($height) . 'px" allowFullScreen="true" allowScriptAccess="always" />', $matches, $attr, $url, $rawattr );
    14391442}
    14401443
    1441 ?>
    1442  No newline at end of file
     1444?>