[wp-trac] [WordPress Trac] #56988: Fatal error when `get_users()` is called before `plugins_loaded`

WordPress Trac noreply at wordpress.org
Thu Nov 3 18:29:09 UTC 2022


#56988: Fatal error when `get_users()` is called before `plugins_loaded`
--------------------------+--------------------
 Reporter:  desrosj       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  6.1.1
Component:  Users         |    Version:  6.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+--------------------
 From ticket:55594#comment:14:

 > Just a heads up that this change (specifically
 [https://github.com/WordPress/wordpress-
 develop/commit/2db7debe8a2f0b2ea264d1765c549bbf5b44a052#diff-
 151c57959e4ecc534341b074289b69ed5a75137ab9a2d3432b5e9b4ce7ea4900R843 this
 one]) breaks plugins that called `get_users()` before `plugins_loaded`
 ran.
 >
 > - https://stackoverflow.com/questions/74289047/wordpress-function-cache-
 users-not-found-after-update-to-6-1
 > - https://stackoverflow.com/questions/74290907/uncaught-error-call-to-
 undefined-function-cache-users
 >
 > This query also surfaces broken sites in the wild:
 https://www.google.com/search?q=Call+to+undefined+function+cache_users()

 The changeset in question: [53655].

 Thanks @obenland for the report.

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


More information about the wp-trac mailing list