Make WordPress Core


Ignore:
Timestamp:
07/27/2015 06:04:19 PM (9 years ago)
Author:
markjaquith
Message:

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

props kitchin
fixes #33093

File:
1 edited

Legend:

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

    r32654 r33447  
    12741274    }
    12751275
    1276     foreach ( glob( $directory . '*', GLOB_ONLYDIR ) as $dir ) {
    1277         $files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) );
     1276    $dirs = glob( $directory . '*', GLOB_ONLYDIR );
     1277    if ( $dirs ) {
     1278        foreach ( $dirs as $dir ) {
     1279            $files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) );
     1280        }
    12781281    }
    12791282
Note: See TracChangeset for help on using the changeset viewer.