From 9dca2c68762f4c2d4dd397b44c14fcc07a13a0a8 Mon Sep 17 00:00:00 2001 From: nacin Date: Fri, 29 Jun 2012 20:57:09 +0000 Subject: [PATCH] Remove old code unsetting a few variables in wp-settings.php. fixes #21115. git-svn-id: http://core.svn.wordpress.org/trunk@21186 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 4 ++-- wp-settings.php | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 49406f61c7..3fa944397c 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -399,14 +399,14 @@ function get_comment_statuses( ) { * * @since 1.5.0 * @uses $wpdb - * @global array $cache_lastcommentmodified * * @param string $timezone Which timezone to use in reference to 'gmt', 'blog', * or 'server' locations. * @return string Last comment modified date. */ function get_lastcommentmodified($timezone = 'server') { - global $cache_lastcommentmodified, $wpdb; + global $wpdb; + static $cache_lastcommentmodified = array(); if ( isset($cache_lastcommentmodified[$timezone]) ) return $cache_lastcommentmodified[$timezone]; diff --git a/wp-settings.php b/wp-settings.php index cb950184f8..1e5751fa5b 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -39,9 +39,6 @@ if ( function_exists( 'date_default_timezone_set' ) ) // Turn register_globals off. wp_unregister_GLOBALS(); -// Ensure these global variables do not exist so they do not interfere with WordPress. -unset( $wp_filter, $cache_lastcommentmodified ); - // Standardize $_SERVER variables across setups. wp_fix_server_vars();