Make WordPress Core

Changeset 12741


Ignore:
Timestamp:
01/17/2010 02:57:59 AM (17 years ago)
Author:
dd32
Message:

Fix WP_Filesystem_Direct::mkdir() when running under safe_mode on certain versions of PHP. Props remi. Fixes #10497

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-filesystem-direct.php

    r12723 r12741  
    280280
    281281        function mkdir($path, $chmod = false, $chown = false, $chgrp = false) {
     282                // safe mode fails with a trailing slash under certain PHP versions.
     283                $path = untrailingslashit($path);
     284                if ( empty($path) )
     285                        $path = '/';
     286
    282287                if ( ! $chmod )
    283288                        $chmod = FS_CHMOD_DIR;
  • trunk/wp-includes/functions.php

    r12740 r12741  
    19351935        $target = str_replace( '//', '/', $target );
    19361936
    1937         // safe mode fails with trailing slash under certain PHP versions.
     1937        // safe mode fails with a trailing slash under certain PHP versions.
    19381938        $target = untrailingslashit($target);
    19391939        if ( empty($target) )
Note: See TracChangeset for help on using the changeset viewer.