WordPress.org

Make WordPress Core

Ticket #6699: 6699.diff

File 6699.diff, 451 bytes (added by Denis-de-Bernardy, 5 years ago)
  • wp-admin/includes/file.php

     
    151151 
    152152        if  ( function_exists('sys_get_temp_dir') ) 
    153153                return trailingslashit(sys_get_temp_dir()); 
     154         
     155        $temp = ini_get('upload_tmp_dir'); 
     156        if ( is_dir($temp) ) // always writable 
     157                return trailingslashit($temp); 
    154158 
    155159        return '/tmp/'; 
    156160}