Viewing 3 replies - 1 through 3 (of 3 total)
  • racoq

    (@racoq)

    Hello!

    I got the exact same error, here is the output:

    Warning: Undefined property: stdClass::$url in /home/…/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 819

    Warning: Undefined property: stdClass::$subscriptions in /home/…/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 820

    Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /home/…/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php:820 Stack trace: #0 /home/…/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php(820): array_map(Array, NULL) #1 /home/…/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php(287): WPSEO_Addon_Manager->map_site_information(Object(stdClass)) #2 /home/…/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php(860): WPSEO_Addon_Manager->get_myyoast_site_information() #3 /home/…/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php(155): WPSEO_Addon_Manager->get_site_information() #4 /home/…/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php(200): WPSEO_Addon_Manager->get_subscriptions() #5 /home/…/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php(305): WPSEO_Addon_Manager->get_subscription(‘yoast-seo-wooco…’) #6 /home/…/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php(480): WPSEO_Addon_Manager->has_valid_subscription(‘yoast-seo-wooco…’) #7 /home/…/public_html/wp-includes/class-wp-hook.php(324): WPSEO_Addon_Manager->validate_addons(”) #8 /home/…/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #9 /home/…/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #10 /home/…/public_html/wp-admin/admin.php(176): do_action(‘admin_init’) #11 /home/…/public_html/wp-admin/plugins.php(10): require_once(‘/home/…/…’) #12 {main} thrown in /home/…/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 820

    I managed to figure a WORKAROUND

    go to wp-content/plugins/wordpress-seo/inc/class-addon-manager.php at line 819:

    replace function map_site_information( $site_information ) with:

        protected function map_site_information( $site_information ) {
    // Initialize default values if properties don't exist
    $url = isset($site_information->url) ? $site_information->url : '';
    $subscriptions = isset($site_information->subscriptions) ? $site_information->subscriptions : [];

    return (object) [
    'url' => $url,
    'subscriptions' => array_map( [ $this, 'map_subscription' ], $subscriptions ),
    ];
    }

    This workaround solves the fatal error, and makes yoast work again 🙂 (at least until yoast team releases a bug fix)

    • This reply was modified 12 months ago by racoq.
    Thread Starter davidecho

    (@davidecho)

    Hi @racoq ,

    Thank you I forgot to mention that my website is now working again after I have re-activated the plugin. But thank you I will keep this in mind if the issue occurs again.

    Waiting for Yoast’s advise to explain what is happening with the error.

    Plugin Support Maybellyne

    (@maybellyne)

    Hello @davidecho,

    I’m sorry about your experience. There was a CloudFlare outage that affected our license check system on the 12th of June. The errors you shared would have been triggered if you have any of our premium plugins installed, even if not activated. However, that has been resolved now.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Fatal Error’ is closed to new replies.