Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter devdevdev998

    (@devdevdev998)

    /**
    * Updates the contactmethods with an additional set of social profiles.
    *
    * These are used with the Facebook author, rel="author", Twitter cards implementation, but also in the
    sameAs schema attributes.
    *
    * @param array<string, string> $contactmethods Currently set contactmethods.
    *
    * @return array<string, string> Contactmethods with added contactmethods.
    */
    public function update_contactmethods( $contactmethods ) {
    $additional_contactmethods = $this->additional_contactmethods_collector->get_additional_contactmethods_objects();
    if( is_array($contactmethods) ){
    return \array_merge( ( $contactmethods ?? [] ), $additional_contactmethods );
    }
    else{
    return [];
    }

    }

    In wordpress-seo/src/user-meta/user-interface/additional-contactmethods-integration.php the return should be updated to solve the error. This is a quick and easy appaorach, but does the trick. Is there anything I can do to get a fix like this into Yoast core?

Viewing 1 replies (of 1 total)