WordPress.org

Make WordPress Core

Ticket #32135: 32135-1.diff

File 32135-1.diff, 420 bytes (added by hnle, 3 years ago)

suggested by taka2 (https://ja.forums.wordpress.org/topic/150570)

  • src/wp-admin/includes/file.php

     
    146146                $dir = get_temp_dir();
    147147        }
    148148
    149         if ( empty( $filename ) || '.' == $filename ) {
     149        if ( empty( $filename ) || '.' == $filename || '/' === $filename ) {
    150150                $filename = time();
    151151        }
    152152