[wp-trac] [WordPress Trac] #41788: PHP Fatal error: Call to a member function has_cap() on a non-object in wp-includes/comment.php

WordPress Trac noreply at wordpress.org
Mon Dec 14 19:20:14 UTC 2020


#41788: PHP Fatal error: Call to a member function has_cap() on a non-object in wp-
includes/comment.php
-------------------------------+------------------------------
 Reporter:  kirbyde            |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Comments           |     Version:  4.8.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by hellofromTonya):

 The code could be further guarded by switching the `isset( $user )` to `!
 empty( $user )`, which would then check if `isset` and not `false`.

 That said, I'm not seeing other reports of this issue.

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


More information about the wp-trac mailing list