Upgrade: Fix updating plugins which include a numeric file/folder names.

The fix in [41821] caused numeric folder names to be reindexed to 0..n when in the root directory (for example, `my-plugin/24/`).

Props edo888.
See #41524.
Merges [42214] to the 4.9 branch.
Fixes #42628 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42215


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2017-11-21 04:16:41 +00:00
parent b09cebf575
commit cee7720939
2 changed files with 3 additions and 2 deletions

View File

@ -342,7 +342,8 @@ class WP_Upgrader {
if ( ! empty( $details['files'] ) ) {
$children = $this->flatten_dirlist( $details['files'], $path . $name . '/' );
$files = array_merge( $files, $children );
// Merge keeping possible numeric keys, which array_merge() will reindex from 0..n
$files = $files + $children;
}
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9.1-alpha-42213';
$wp_version = '4.9.1-alpha-42215';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.