[wp-trac] [WordPress Trac] #33947: get_comment_class raises a PHP notice for non-registered users
WordPress Trac
noreply at wordpress.org
Mon Sep 21 16:50:10 UTC 2015
#33947: get_comment_class raises a PHP notice for non-registered users
------------------------------------------+------------------------------
Reporter: walterebert | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: trunk
Severity: normal | Resolution:
Keywords: needs-unit-tests needs-patch | Focuses: template
------------------------------------------+------------------------------
Changes (by DrewAPicture):
* keywords: => needs-unit-tests needs-patch
Comment:
Hi @walterebert, welcome to Trac and thanks for the patch!
It seems like we should actually be checking if the `get_comment(
$comment_id )` a few lines up is returning a valid comment object. My
guess is the notice you're getting is probably from an invalid comment ID
being passed and core not bailing if the comment is invalid.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33947#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list