Make WordPress Core


Ignore:
Timestamp:
10/13/2011 10:43:38 AM (15 years ago)
Author:
dd32
Message:

WP_Filesystem_*::mkdir() untrailingslash path consistently, don't waste time attempting to create an "empty" path. See #15575. Props lordandrei and SergeyBiryukov for initial patches.

File:
1 edited

Legend:

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

    r18632 r18964  
    248248        }
    249249        function mkdir($path, $chmod = false, $chown = false, $chgrp = false) {
     250                $path = untrailingslashit($path);
     251                if ( empty($path) )
     252                        return false;
     253
    250254                if ( !@ftp_mkdir($this->link, $path) )
    251255                        return false;
Note: See TracChangeset for help on using the changeset viewer.