[resolved] Fatal error during wp-cron requests in 3.0beta1 (4 posts)

  1. Samir Shah
    Posted 6 years ago #

    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.

    Any ideas what is causing this?

  2. I can repro this too. Opened https://core.trac.wordpress.org/ticket/12997 for this one.

  3. Samir Shah
    Posted 6 years ago #

    Cheers, we'll follow this there then.

  4. Okay I have a 'fix' - If you delete the field link_category in wp_links in your database, it goes away.

    Now what that means? Damned if I know. But it works on my blog. I've left it unchanged on another so I can test any fixes the dev team make to correct it in the wp install!

Topic Closed

This topic has been closed to new replies.

About this Topic