From add01ff78acda33e3485162aef684218b5d76927 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 19 Apr 2005 21:41:35 +0000 Subject: [PATCH] Bail if the theme does not exist. git-svn-id: http://svn.automattic.com/wordpress/trunk@2553 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 f216da0d1..3ebf035c2 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']);