Make WordPress Core

Changeset 27055


Ignore:
Timestamp:
01/29/2014 05:16:58 AM (10 years ago)
Author:
wonderboymusic
Message:

Add Unit Tests for get_comment_pages_count(). Fix a notice caused when $wp_query->comments is not set in that function.

Props mdbitz, markjaquith.
Fixes #20633.

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r26867 r27055  
    910910        return $wp_query->max_num_comment_pages;
    911911
    912     if ( !$comments || !is_array($comments) )
     912    if ( ( ! $comments || ! is_array( $comments ) ) && ! empty( $wp_query->comments ) )
    913913        $comments = $wp_query->comments;
    914914
Note: See TracChangeset for help on using the changeset viewer.