Make WordPress Core

Changeset 14427


Ignore:
Timestamp:
05/03/2010 11:39:57 PM (14 years ago)
Author:
dd32
Message:

Silence PHP Warnings on is_writable calls. Can trigger open_basedir warnings on certain hosting environments. Props ocean90. Fixes #12866

File:
1 edited

Legend:

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

    r14418 r14427  
    158158
    159159    $temp = WP_CONTENT_DIR . '/';
    160     if ( is_dir($temp) && is_writable($temp) )
     160    if ( is_dir($temp) && @is_writable($temp) )
    161161        return $temp;
    162162
    163163    if  ( function_exists('sys_get_temp_dir') ) {
    164164        $temp = sys_get_temp_dir();
    165         if ( is_writable($temp) )
     165        if ( @is_writable($temp) )
    166166            return trailingslashit($temp);
    167167    }
    168168
    169169    $temp = ini_get('upload_tmp_dir');
    170     if ( is_dir($temp) && is_writable($temp) )
     170    if ( is_dir($temp) && @is_writable($temp) )
    171171        return trailingslashit($temp);
    172172
Note: See TracChangeset for help on using the changeset viewer.