mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00: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:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user