From 3647231af6111037d0008e61a2990e5990de869f Mon Sep 17 00:00:00 2001 From: Andrew 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: https://develop.svn.wordpress.org/trunk@21126 602fd350-edb4-49c9-b593-d223f7449a82 --- 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;