From f089ebcfe4cce8f5b79972935fcd195d5dfaacef Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 12 Aug 2008 21:13:25 +0000 Subject: [PATCH] Quote array indexes. Props wet. fixes #7502 git-svn-id: http://svn.automattic.com/wordpress/trunk@8629 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 2ba2f3d4e..3d7cddbd2 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -505,18 +505,18 @@ function preview_theme() { if ( !current_user_can( 'switch_themes' ) ) return; - $_GET[template] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET[template]); + $_GET['template'] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET['template']); - if ( validate_file($_GET[template]) ) + if ( validate_file($_GET['template']) ) return; - add_filter('template', create_function('', "return '$_GET[template]';") ); + add_filter('template', create_function('', "return '{$_GET['template']}';") ); if ( isset($_GET['stylesheet']) ) { - $_GET[stylesheet] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET[stylesheet]); - if ( validate_file($_GET[stylesheet]) ) + $_GET['stylesheet'] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET['stylesheet']); + if ( validate_file($_GET['stylesheet']) ) return; - add_filter('stylesheet', create_function('', "return '$_GET[stylesheet]';") ); + add_filter('stylesheet', create_function('', "return '{$_GET['stylesheet']}';") ); } ob_start( 'preview_theme_ob_filter' );