Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Sneaky notice in Mlp_Translation. #132

@Biont

Description

@Biont

There have been reports of a Notice: Undefined index: icon in wp-content/plugins/multilingual-press/inc/types/Mlp_Translation.php on line 63

This can happen if the config array is missing the 'icon' element.

In Mlp_Language_Api:L326-L340, the 'icon' element is only set when 'http_name' is not empty:

if ( '' !== $data[ 'http_name' ] ) {
        $arr[ 'icon' ] = $this->get_flag_by_language(
            $data[ 'http_name' ],
            $site_id
        );
    }

An easy fix would be to ensure the 'icon' element is set in any case.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions