WordPress.org

Make WordPress Core

Changeset 14456


Ignore:
Timestamp:
05/04/10 21:55:34 (4 years ago)
Author:
nbachiyski
Message:

Cast the result of glob(), because on some systems it returns false on empty result set. Props ipstenu, fixes #13252

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/l10n.php

    r14417 r14456  
    494494    $languages = array();    
    495495         
    496     foreach( glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) { 
     496    foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) { 
    497497        if ( false === strpos( $lang_file, 'continents-cities' ) ) { 
    498498            $languages[] = basename($lang_file, '.mo'); 
Note: See TracChangeset for help on using the changeset viewer.