WordPress.org

Make WordPress Core

Ticket #36184: functions.php.diff

File functions.php.diff, 572 bytes (added by robertstaddon, 5 years ago)
  • wp-includes/functions.php

    diff --git a/wp-includes/functions.php b/wp-includes/functions.php
    index 292abf9..66b53a8 100644
    a b function wp_mkdir_p( $target ) { 
    16181618
    16191619        // We need to find the permissions of the parent folder that exists and inherit that.
    16201620        $target_parent = dirname( $target );
    1621         while ( '.' != $target_parent && ! is_dir( $target_parent ) ) {
     1621        while ( '.' != $target_parent && ! is_dir( $target_parent ) && @is_readable( $target_parent ) ) {
    16221622                $target_parent = dirname( $target_parent );
    16231623        }