From 9d8f012f326473720d62b22c21877b9f70ef8f08 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 19 Apr 2005 21:41:35 +0000 Subject: [PATCH] Bail if the theme does not exist. git-svn-id: https://develop.svn.wordpress.org/trunk@2553 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/theme-editor.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index f216da0d11..3ebf035c2b 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -26,7 +26,11 @@ if (empty($theme)) { $theme = get_current_theme(); } else { $theme = stripslashes($theme); -} + } + + +if ( ! isset($themes[$theme]) ) + die(__('The requested theme does not exist.')); $allowed_files = array_merge($themes[$theme]['Stylesheet Files'], $themes[$theme]['Template Files']);