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
This commit is contained in:
nacin 2012-06-26 03:36:03 +00:00
parent 4e8f4e57d1
commit bb667710a6
1 changed files with 1 additions and 1 deletions

View File

@ -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;