Make WordPress Core


Ignore:
Timestamp:
10/05/2019 02:15:13 AM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r46399 r46400  
    17061706
    17071707    foreach ( (array) $dirlist as $filename => $fileinfo ) {
    1708         if ( in_array( $filename, $skip_list ) ) {
     1708        if ( in_array( $filename, $skip_list, true ) ) {
    17091709            continue;
    17101710        }
Note: See TracChangeset for help on using the changeset viewer.