diff --git a/wp-includes/functions.php b/wp-includes/functions.php index da9f6326a1..ea03b56b8f 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1615,7 +1615,7 @@ function wp_mkdir_p( $target ) { // We need to find the permissions of the parent folder that exists and inherit that. $target_parent = dirname( $target ); - while ( '.' != $target_parent && ! is_dir( $target_parent ) ) { + while ( '.' != $target_parent && ! is_dir( $target_parent ) && dirname( $target_parent ) !== $target_parent ) { $target_parent = dirname( $target_parent ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index c13ccc9d0c..6190acf88b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9.5-alpha-42803'; +$wp_version = '4.9.5-alpha-42804'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.