WordPress.org

Make WordPress Core

Ticket #10224: 10224.2.diff

File 10224.2.diff, 469 bytes (added by dd32, 6 years ago)
  • wp-admin/includes/file.php

     
    170170        $filename = basename($filename); 
    171171        if ( empty($filename) ) 
    172172                $filename = time(); 
    173  
     173        $filename = preg_replace('|\..*$|', '.tmp', $filename); 
    174174        $filename = $dir . wp_unique_filename($dir, $filename); 
    175175        touch($filename); 
    176176        return $filename;