wp_count_comments throws Error Notice for unknown comment_approved types
|Reported by:||batmoo||Owned by:||ryan|
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.
Change History (10)
- Keywords 3.2-early added
- Milestone changed from Awaiting Review to Future Release