Support » Plugin: Yoast SEO » Yoast giving error when choosing my language

  • Resolved realexlex

    (@realexlex)


    Yoast is working fine when my language is English (us), but when I chance it to Finnish it give two errors:

    Notice: Undefined offset: 1 in /wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php on line 69

    Notice: Undefined offset: 1 in /wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php on line 69

    Here is the code from class-admin-asset-manager.php on line 69:

    /**
    * Calls the functions that register scripts and styles with the scripts and styles to be registered as arguments.
    */
    public function register_assets() {
    $locale = get_locale();
    list( $language, $territory ) = explode( ‘_’, $locale );

    wp_register_script(
    self::PREFIX . ‘intl-polyfill’,
    sprintf( ‘https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~locale.%s’, $language ),
    array(),
    WPSEO_VERSION
    );

    $this->register_scripts( $this->scripts_to_be_registered() );
    $this->register_styles( $this->styles_to_be_registered() );
    }

    Any ideas how to fix this problem?
    My Yoast version is 5.9.2
    And WP versio 4.91

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Yoast giving error when choosing my language’ is closed to new replies.