Filesystem API: Avoid an infinite loop in `wp_mkdir_p()` when trying to determine the parent folder with `open_basedir` restriction in effect.
Props soulseekah, 1265578519-1. Fixes #43417. Built from https://develop.svn.wordpress.org/trunk@42801 git-svn-id: http://core.svn.wordpress.org/trunk@42631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c1897645a2
commit
996efe8f6e
|
@ -1679,7 +1679,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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-42800';
|
||||
$wp_version = '5.0-alpha-42801';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue