[wp-trac] [WordPress Trac] #15215: wp_count_comments throws Error Notice for unknown comment_approved types
WordPress Trac
wp-trac at lists.automattic.com
Mon Oct 25 20:57:38 UTC 2010
#15215: wp_count_comments throws Error Notice for unknown comment_approved types
--------------------------+-------------------------------------------------
Reporter: batmoo | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 3.0.1
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
If you have any comments with a comment_approved value of an "unknown
type" (i.e. anything other than '0' => 'moderated', '1' => 'approved',
'spam' => 'spam', 'trash' => 'trash', 'post-trashed' => 'post-trashed'),
wp_count_comments throws an error notice.
''Notice: Undefined index: 'my-custom-approved' in
/Users/moo/Sites/dev/WordPress/wp-includes/comment.php on line 858''
Setting the in_array check to strict, fixes the error.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15215>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list