From e1b03b4fd4657b3b3a17294d1e7a47a28862d10d Mon Sep 17 00:00:00 2001 From: Andrew 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: https://develop.svn.wordpress.org/trunk@21186 602fd350-edb4-49c9-b593-d223f7449a82 --- 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();