[wp-trac] [WordPress Trac] #54607: Attempt to read property "comment_ID" on null

WordPress Trac noreply at wordpress.org
Tue Dec 14 15:01:25 UTC 2021


#54607: Attempt to read property "comment_ID" on null
-------------------------------+---------------------
 Reporter:  Grzegorz.Janoszka  |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  6.0
Component:  Comments           |     Version:
 Severity:  minor              |  Resolution:
 Keywords:  php8               |     Focuses:
-------------------------------+---------------------

Comment (by johnregan3):

 There are several places where `get_comment()` is called, then assumed to
 be an object (See `get_comment_text()`, get_comment_time(), etc.)

 Should all of these related functions be updated to check for a null
 `$comment` value in this ticket?  I assume so, but wanted to verify before
 I start on this task.

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


More information about the wp-trac mailing list