From e6be89ee0a221d34d0c93e4274f08464c83389af Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 19 Nov 2009 16:35:17 +0000 Subject: [PATCH] Avoid warning when parent template does not exist. git-svn-id: https://develop.svn.wordpress.org/trunk@12216 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/theme.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index a7ab4378db..397f8c17f3 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -316,9 +316,8 @@ function get_themes() { * The parent theme doesn't exist in the current theme's folder or sub folder * so lets use the theme root for the parent template. */ - $parent_theme_root = $theme_files[$template]['theme_root']; - if ( file_exists( "$parent_theme_root/$template/index.php" ) ) { - $template_directory = "$parent_theme_root/$template"; + if ( isset($theme_files[$template]) && file_exists( $theme_files[$template]['theme_root'] . "/$template/index.php" ) ) { + $template_directory = $theme_files[$template]['theme_root'] . "/$template"; } else { $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.')); continue;