mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
Cast the result of glob(), because on some systems it returns false on empty result set. Props ipstenu, fixes #13252
git-svn-id: https://develop.svn.wordpress.org/trunk@14456 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8d6694a68d
commit
53e65714a1
@ -493,7 +493,7 @@ function translate_user_role( $name ) {
|
||||
function get_available_languages( $dir = null ) {
|
||||
$languages = array();
|
||||
|
||||
foreach( glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) {
|
||||
foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) {
|
||||
if ( false === strpos( $lang_file, 'continents-cities' ) ) {
|
||||
$languages[] = basename($lang_file, '.mo');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user