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. Fixes #42628 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@42214 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4ec5d65dcc
commit
2c1858a8c3
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue