From 3b6a13b52058212588dc32bf2ff96a6928fa0a48 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Tue, 28 Oct 2008 01:20:38 +0000 Subject: [PATCH] Fix redirecting of old slugs when Close Old Comments is enabled, props DD32, fixes #7976 git-svn-id: https://develop.svn.wordpress.org/trunk@9373 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 538429a51f..bf8b87c8be 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -1537,7 +1537,7 @@ function update_comment_cache($comments) { * @return object */ function _close_comments_for_old_posts( $posts ) { - if ( !is_single() || !get_option('close_comments_for_old_posts') ) + if ( empty($posts) || !is_single() || !get_option('close_comments_for_old_posts') ) return $posts; $days_old = (int) get_option('close_comments_days_old');