[wp-trac] [WordPress Trac] #58188: is_user_logged_in can cause null pointer exception
WordPress Trac
noreply at wordpress.org
Mon Apr 24 20:51:04 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:
-------------------------------+------------------------------
Changes (by TobiasBg):
* keywords: => reporter-feedback
* version: 6.2 => 2.0.3
Comment:
Hi @preissdigital, thanks for your report!
Can you maybe clarify where `_wp_get_current_user` can return `0`? From
what I can see, it always returns the `$current_user` global variable, and
makes sure to create/set that by calling `wp_set_current_user` if it's not
a `WP_User` object yet.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58188#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list