Make WordPress Core

Ticket #43138: 43138.patch

File 43138.patch, 777 bytes (added by idofri, 7 years ago)
  • wp-includes/post.php

     
    52105210        // Remove intermediate and backup images if there are any.
    52115211        if ( isset( $meta['sizes'] ) && is_array( $meta['sizes'] ) ) {
    52125212                foreach ( $meta['sizes'] as $size => $sizeinfo ) {
    5213                         $intermediate_file = str_replace( basename( $file ), $sizeinfo['file'], $file );
     5213                        $intermediate_file = str_replace( wp_basename( $file ), $sizeinfo['file'], $file );
    52145214                        /** This filter is documented in wp-includes/functions.php */
    52155215                        $intermediate_file = apply_filters( 'wp_delete_file', $intermediate_file );
    52165216                        @ unlink( path_join( $uploadpath['basedir'], $intermediate_file ) );