From ab584ff499e3540f289f6da5dc6a3bf048218655 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Thu, 10 Dec 2015 23:08:46 +0000 Subject: [PATCH] L10n: Use an absolute path for the `is_dir()` check when looking for installed translations. Avoids warnings when `open_basedir` restrictions are in effect. Props Profforg. Fixes #34526. git-svn-id: https://develop.svn.wordpress.org/trunk@35856 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/l10n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php index c017952516..2a679128e5 100644 --- a/src/wp-includes/l10n.php +++ b/src/wp-includes/l10n.php @@ -891,7 +891,7 @@ function wp_get_installed_translations( $type ) { $language_data = array(); foreach ( $files as $file ) { - if ( '.' === $file[0] || is_dir( $file ) ) { + if ( '.' === $file[0] || is_dir( WP_LANG_DIR . "$dir/$file" ) ) { continue; } if ( substr( $file, -3 ) !== '.po' ) {