8
0

fix error if configuration is missing

Dieser Commit ist enthalten in:
Daniel Seifert 2022-12-15 08:38:52 +01:00
Ursprung 841d2c0879
Commit 07b4f9523d
Signiert von: DanielS
GPG-Schlüssel-ID: 8A7C4C6ED1915C6F

Datei anzeigen

@ -93,7 +93,7 @@ class Configuration
public function getOrderRecipientFields(): array
{
/** @var string[] $customFields */
$customFields = Registry::getConfig()->getConfigParam(self::ORDER_RECFIELDS);
$customFields = Registry::getConfig()->getConfigParam(self::ORDER_RECFIELDS) ?: [];
array_walk(
$customFields,
@ -113,7 +113,7 @@ class Configuration
public function getUserRecipientFields(): array
{
/** @var string[] $customFields */
$customFields = Registry::getConfig()->getConfigParam(self::USER_RECFIELDS);
$customFields = Registry::getConfig()->getConfigParam(self::USER_RECFIELDS) ?: [];
array_walk(
$customFields,
@ -138,7 +138,7 @@ class Configuration
{
$checkCountryFieldName = $args[self::ARGS_CHECKKEYS] ? trim($checkCountryFieldName) : $checkCountryFieldName;
$checkPhoneFieldName = trim($checkPhoneFieldName);
$allFieldNames = oxNew($args[self::ARGS_CHECKCLASS])->getFieldNames();
$allFieldNames = oxNew($args[self::ARGS_CHECKCLASS])->getFieldNames() ?: [];
array_walk($allFieldNames, function (&$value) {
$value = strtolower($value);