Ensure we get a theme back from wp_get_theme() before checking ->errors(). see #20103.

git-svn-id: https://develop.svn.wordpress.org/trunk@20331 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-03-30 16:35:51 +00:00
parent efdcdfdf36
commit 47a29d2c26

View File

@ -344,7 +344,7 @@ function populate_options() {
$template = WP_DEFAULT_THEME;
// If default theme is a child theme, we need to get its template
$theme = wp_get_theme( $template );
if ( ! $theme->errors() )
if ( $theme && ! $theme->errors() )
$template = $theme->get_template();
$timezone_string = '';