Fix redirecting of old slugs when Close Old Comments is enabled, props DD32, fixes #7976

git-svn-id: http://svn.automattic.com/wordpress/trunk@9373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-10-28 01:20:38 +00:00
parent b392c3a35f
commit f7ea3c572b
1 changed files with 1 additions and 1 deletions

View File

@ -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');