[wp-trac] [WordPress Trac] #58188: is_user_logged_in can cause null pointer exception

WordPress Trac noreply at wordpress.org
Wed Apr 26 18:39:02 UTC 2023


#58188: is_user_logged_in can cause null pointer exception
-------------------------------+------------------------------
 Reporter:  preissdigital      |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  General            |     Version:  2.0.3
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by oglekler):

 I also didn't find where there can be 0, {{{wp_set_current_user}}} returns
 a new WP_User with id = 0, but it is a correct instance.

 @preissdigital, please write how we can reproduce the issue.

 I've noted that {{{is_user_logged_in}}} is a pluggable function, that
 means that this function is only available after all plugins are loaded.

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


More information about the wp-trac mailing list