Call to a member function get_names() on a non-object in user.php
|Reported by:||ipstenu||Owned by:|
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:
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.
I can repro it as well.