mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-10 12:50:18 +01:00
Filesystem API: Use strict type check in the in_array()
call for the $skip_list
parameter in copy_dir()
and _copy_dir()
.
This ensures that parent folders with a numeric name are not accidentally skipped when only a subfolder is intended to be skipped. Props codex-m. Fixes #46581. Built from https://develop.svn.wordpress.org/trunk@46400 git-svn-id: http://core.svn.wordpress.org/trunk@46199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
30913bc9a2
commit
f19ecd19de
@ -1705,7 +1705,7 @@ function copy_dir( $from, $to, $skip_list = array() ) {
|
|||||||
$to = trailingslashit( $to );
|
$to = trailingslashit( $to );
|
||||||
|
|
||||||
foreach ( (array) $dirlist as $filename => $fileinfo ) {
|
foreach ( (array) $dirlist as $filename => $fileinfo ) {
|
||||||
if ( in_array( $filename, $skip_list ) ) {
|
if ( in_array( $filename, $skip_list, true ) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1312,7 +1312,7 @@ function _copy_dir( $from, $to, $skip_list = array() ) {
|
|||||||
$to = trailingslashit( $to );
|
$to = trailingslashit( $to );
|
||||||
|
|
||||||
foreach ( (array) $dirlist as $filename => $fileinfo ) {
|
foreach ( (array) $dirlist as $filename => $fileinfo ) {
|
||||||
if ( in_array( $filename, $skip_list ) ) {
|
if ( in_array( $filename, $skip_list, true ) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-beta2-46399';
|
$wp_version = '5.3-beta2-46400';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user