[wp-trac] [WordPress Trac] #62963: Fatal is_admin_bar_showing() - Call to undefined function is_user_logged_in()

WordPress Trac noreply at wordpress.org
Fri Feb 14 06:56:09 UTC 2025


#62963: Fatal is_admin_bar_showing() - Call to undefined function
is_user_logged_in()
----------------------------+-----------------------------
 Reporter:  kkmuffme        |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 When hooking a callback on e.g. "muplugins_loaded" or on "shutdown" from
 an mu-plugin, object cache or advanced cache and checking
 "is_admin_bar_showing()", you can get a fatal bc pluggable.php which is
 called isn't loaded yet.

 Either add a function exists check for "is_user_logged_in" or load
 pluggable.php early?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62963>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list