From bb667710a60f6d8fceb2a8e92976c30564b31c94 Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 26 Jun 2012 03:36:03 +0000 Subject: [PATCH] When looking in a sub-directory of wp-content/themes for more themes, check if that specific directory exists before looking inside of it for style.css. This avoids warnings when open_basedir restrictions are in effect. props goldenapples. see #20985 for trunk. git-svn-id: http://core.svn.wordpress.org/trunk@21126 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index b2b7ba48ae..ba968bca8f 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -393,7 +393,7 @@ function search_theme_directories( $force = false ) { if ( ! $sub_dirs ) return false; foreach ( $sub_dirs as $sub_dir ) { - if ( ! is_dir( $theme_root . '/' . $dir ) || $dir[0] == '.' || $dir == 'CVS' ) + if ( ! is_dir( $theme_root . '/' . $dir . '/' . $sub_dir ) || $dir[0] == '.' || $dir == 'CVS' ) continue; if ( ! file_exists( $theme_root . '/' . $dir . '/' . $sub_dir . '/style.css' ) ) continue;