Make WordPress Core


Ignore:
Timestamp:
03/28/2020 08:42:31 PM (5 years ago)
Author:
johnbillion
Message:

Comments: Ensure all elements in the array returned by get_comment_count() are integers.

Previously elements would be a mixture of strings and integers depending on their numeric value.

Props progremzion, m.usama.masood

Fixes #48093

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/import/import.php

    r47198 r47526  
    8282        $this->assertEquals( 1, $page_count->draft );
    8383        $comment_count = wp_count_comments();
    84         $this->assertEquals( 1, $comment_count->total_comments );
     84        $this->assertSame( 1, $comment_count->total_comments );
    8585
    8686        $posts = get_posts(
     
    246246        $this->assertEquals( 1, $page_count->draft );
    247247        $comment_count = wp_count_comments();
    248         $this->assertEquals( 1, $comment_count->total_comments );
     248        $this->assertSame( 1, $comment_count->total_comments );
    249249    }
    250250
Note: See TracChangeset for help on using the changeset viewer.