• Resolved gynleo2

    (@gynleo2)


    After we upgraded PHP to version 8, we are getting a fatal error on our blog page:

    Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in /nas/content/live/mavcodev/wp-content/plugins/all-in-one-seo-pack/app/Common/Social/Output.php:142 Stack trace: #0 /nas/content/live/mavcodev/wp-content/plugins/all-in-one-seo-pack/app/Common/Social/Output.php(142): array_filter(NULL) #1 /nas/content/live/mavcodev/wp-content/plugins/all-in-one-seo-pack/app/Common/Views/main/social.php(29): AIOSEO\Plugin\Common\Social\Output->getTwitterMeta() #2 /nas/content/live/mavcodev/wp-content/plugins/all-in-one-seo-pack/app/Common/Main/Head.php(173): require(‘/nas/content/li…’) #3 /nas/content/live/mavcodev/wp-content/plugins/all-in-one-seo-pack/app/Common/Main/Head.php(94): AIOSEO\Plugin\Common\Main\Head->output() #4 /nas/content/live/mavcodev/wp-includes/class-wp-hook.php(307): AIOSEO\Plugin\Common\Main\Head->init(”) #5 /nas/content/live/mavcodev/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #6 /nas/content/live/mavcodev/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #7 /nas/content/live/mavcodev/wp-includes/general-template.php(3042): do_action(‘wp_head’) #8 /nas/content/live/mavcodev/wp-content/themes/salient/header.php(23): wp_head() #9 /nas/content/live/mavcodev/wp-includes/template.php(770): require_once(‘/nas/content/li…’) #10 /nas/content/live/mavcodev/wp-includes/template.php(716): load_template(‘/nas/content/li…’, true, Array) #11 /nas/content/live/mavcodev/wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #12 /nas/content/live/mavcodev/wp-content/themes/salient-child/index.php(1): get_header() #13 /nas/content/live/mavcodev/wp-includes/template-loader.php(106): include(‘/nas/content/li…’) #14 /nas/content/live/mavcodev/wp-blog-header.php(19): require_once(‘/nas/content/li…’) #15 /nas/content/live/mavcodev/index.php(17): require(‘/nas/content/li…’) #16 {main} thrown in /nas/content/live/mavcodev/wp-content/plugins/all-in-one-seo-pack/app/Common/Social/Output.php on line 142

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Naveen Kharwar

    (@naveenkharwar)

    Hi @gynleo2,

    Thank you for contacting us and for bringing this to our attention.

    Can you please check if there is any filter on your site that’s hooking to aioseo_twitter_tags?

    I’m looking forward to your response.

    Thanks,
    Naveen Kharwar

    Thread Starter gynleo2

    (@gynleo2)

    Hi Naveen, yes, we have the following filter:

    add_filter( ‘aioseo_twitter_tags’, ‘aioseo_filter_twitter_title’ );
    function aioseo_filter_twitter_title( $twitterMeta ) {
    if ( get_post_type() == ‘post’) {
    return;
    }
    unset($twitterMeta[‘twitter:label1’]);
    unset($twitterMeta[‘twitter:data1’]);
    return $twitterMeta;
    }

    After you mentioned it, I changed the filter and it started working. So the problem was on our end 🙂

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @gynleo2,

    That’s great to hear!

    You’ll just want to clear out the values instead of unsetting the keys. In any case, I’ll see if we can improve this on our end as well though.

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

The topic ‘Fatal Error after upgrading to PHP 8’ is closed to new replies.