[wp-trac] [WordPress Trac] #62169: Use strict comparison in wp_list_comments() (was: A strict comparison should be implemented in the wp-includes/comment-template.php in wp_list_comments function)

WordPress Trac noreply at wordpress.org
Sat Oct 5 03:52:35 UTC 2024


#62169: Use strict comparison in wp_list_comments()
---------------------------+-------------------------------
 Reporter:  deepakrohilla  |       Owner:  deepakrohilla
     Type:  defect (bug)   |      Status:  assigned
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Comments       |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  coding-standards
---------------------------+-------------------------------
Changes (by sabernhardt):

 * focuses:   => coding-standards
 * component:  General => Comments


Old description:

> A strict comparison should be implemented in the wp-includes/comment-
> template.php file in wp_list_comments() on line 2291:
> if ( $parsed_args['page'] !== $current_cpage || $parsed_args['per_page']
> !== $current_per_page ) .
>
> $parsed_args['page'] and $current_cpage, as well as
> $parsed_args['per_page'] and $current_per_page, both return integer
> values. I have not observed any of these variables returning a different
> return type.

New description:

 A strict comparison should be implemented in the `wp-includes/comment-
 template.php` file in `wp_list_comments()` on line 2291:
 `if ( $parsed_args['page'] !== $current_cpage || $parsed_args['per_page']
 !== $current_per_page )` .

 `$parsed_args['page']` and `$current_cpage`, as well as
 `$parsed_args['per_page']` and `$current_per_page`, both return integer
 values. I have not observed any of these variables returning a different
 return type.

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62169#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list