Make WordPress Core


Ignore:
Timestamp:
07/29/2015 06:52:42 AM (11 years ago)
Author:
pento
Message:

Don't blindly trust the output of glob() to be an array.

Props kitchin.

Merge of [33447] to the 4.2 branch.

Fixes #33093.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/src/wp-admin/includes/update-core.php

    r32386 r33481  
    12501250        }
    12511251
    1252         foreach ( glob( $directory . '*', GLOB_ONLYDIR ) as $dir ) {
    1253                 $files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) );
     1252        $dirs = glob( $directory . '*', GLOB_ONLYDIR );
     1253        if ( $dirs ) {
     1254                foreach ( $dirs as $dir ) {
     1255                        $files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) );
     1256                }
    12541257        }
    12551258
Note: See TracChangeset for help on using the changeset viewer.