fix: avoid undefined index error

pull/8361/head
Luciano Righetti 2022-05-11 15:35:03 +02:00
parent c82f8e5d03
commit 726e7fbe4b
1 changed files with 2 additions and 1 deletions

View File

@ -485,7 +485,8 @@ class Feed extends AppModel
}
if (in_array($attribute['type'], $compositeTypes, true)) {
list($value1, $value2) = explode('|', $attribute['value']);
$parts = explode('|', $attribute['value']) ?? [null, null];
list($value1, $value2) = count($parts) === 1 ? [$parts[0], null] : $parts;
$parts = [$value1];
if (!in_array($attribute['type'], Attribute::PRIMARY_ONLY_CORRELATING_TYPES, true)) {