WordPress.org

Make WordPress Core

Changeset 12519


Ignore:
Timestamp:
12/23/2009 04:22:26 PM (11 years ago)
Author:
ryan
Message:

Check upload_tmp_dir ini settings for a usable temporary path. Props Denis-de-Bernardy. fixes #6699

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/file.php

    r12489 r12519  
    156156    if  ( function_exists('sys_get_temp_dir') )
    157157        return trailingslashit(sys_get_temp_dir());
     158   
     159    $temp = ini_get('upload_tmp_dir');
     160    if ( is_dir($temp) ) // always writable
     161        return trailingslashit($temp);
    158162
    159163    return '/tmp/';
Note: See TracChangeset for help on using the changeset viewer.