diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index a84aebeb31..8660f60414 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -51,7 +51,7 @@ else $theme = wp_get_theme( $stylesheet ); -if ( ! $theme ) +if ( ! $theme->exists() ) wp_die( __( 'The requested theme does not exist.' ) ); $allowed_files = $theme->get_files( 'php', 1 );