[wp-trac] [WordPress Trac] #64223: Undefined variable $comments_count
WordPress Trac
noreply at wordpress.org
Mon Nov 10 17:32:14 UTC 2025
#64223: Undefined variable $comments_count
--------------------------+-----------------------------
Reporter: zagna | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
In function `wp_dashboard_recent_comments` if the `foreach` always goes to
the `continue`, `$comments_count` is never set and gives a warning.
{{{#!php
<?php
add_filter( 'register_post_post_type_args', function($args, $post_type) {
$args['map_meta_cap'] = false;
return $args;
}, 10, 2);
}}}
Adding this to twentytwentyfive `functions.php` for a quick reproduction
on a fresh 6.9b4
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64223>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list