Make WordPress Core


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

File:
1 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;
Note: See TracChangeset for help on using the changeset viewer.