Make WordPress Core

Ticket #20633: 20633.diff

File 20633.diff, 638 bytes (added by markjaquith, 13 years ago)
  • wp-includes/comment.php

    function get_comment_pages_count( $comments = null, $per_page = null, $threaded 
    752752        if ( null === $comments && null === $per_page && null === $threaded && !empty($wp_query->max_num_comment_pages) )
    753753                return $wp_query->max_num_comment_pages;
    754754
    755         if ( !$comments || !is_array($comments) )
     755        if ( ( !$comments || !is_array($comments) ) && !empty( $wp_query->comments ) )
    756756                $comments = $wp_query->comments;
    757757
    758758        if ( empty($comments) )