Check if formatter key exist

This commit is contained in:
Jean-Francois Monfort 2021-02-11 16:29:57 +01:00
parent a31e3ad6f6
commit c8507b4a13

View File

@ -567,11 +567,15 @@ class ExportManager
* get the formatter alias from the form export data
*
* @param array $data the data from the export form
* @string the formatter alias
* @string the formatter alias|null
*/
public function getFormatterAlias(array $data)
{
return $data[ExportType::PICK_FORMATTER_KEY]['alias'];
if (array_key_exists(ExportType::PICK_FORMATTER_KEY, $data)) {
return $data[ExportType::PICK_FORMATTER_KEY]['alias'];
}
return null;
}
/**