[wp-trac] [WordPress Trac] #12997: Call to a member function get_names() on a non-object in user.php
WordPress Trac
wp-trac at lists.automattic.com
Wed Apr 14 13:04:27 UTC 2010
#12997: Call to a member function get_names() on a non-object in user.php
--------------------------+-------------------------------------------------
Reporter: ipstenu | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version: 3.0
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
This is showing up in my error.log on both 3.0 installes:
{{{ PHP Fatal error: Call to a member function get_names() on a non-
object in /home/ipstenu/public_html/wp-includes/user.php on line 422 }}}
'''solarissmoke''' (on the wp.org forums) did more research and came up
with this:
Hi folks,
I'm getting this error when wordpress does cron jobs (by visiting wp-
cron.php?doing_wp_cron):
PHP Fatal error: Call to a member function get_names() on a non-object in
/wp-includes/user.php on line 422
I think that the function where the error occurs (count_users()) is being
called by the wp_version_check function which is one of the regular cron
actions. The error suggests that the global variable $wp_roles has not
been created by the time the function is called - but I can't track where
this should be happening in the first place.
I've looked at my cron options and the only ones there are the defaults
(wp_update_plugins, wp_version_check, wp_update_themes,
wp_scheduled_delete).
The error is occurring every single time wp-cron.php is accessed.
See: http://wordpress.org/support/topic/387647
I can repro it as well.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12997>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list