diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 49406f61c7d0..3fa944397ced 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 cb950184f842..1e5751fa5b58 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -39,9 +39,6 @@ // 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();