diff --git a/Helper/Config.php b/Helper/Config.php index 8f437a7..8bd7bff 100644 --- a/Helper/Config.php +++ b/Helper/Config.php @@ -97,10 +97,12 @@ public function isFrontend(): bool public function getAllowedIPs(): array { - return array_filter(array_map('trim', explode(',', (string) $this->scopeConfig->getValue( - self::CONFIG_ALLOWED_IPS, - ScopeConfigInterface::SCOPE_TYPE_DEFAULT - )))); + $value = $this->scopeConfig->getValue(self::CONFIG_ALLOWED_IPS, ScopeConfigInterface::SCOPE_TYPE_DEFAULT); + if(empty($value)) + { + return []; + } + return array_filter(array_map('trim', explode(',', $value))); } /**