diff --git a/src/Model/Configuration.php b/src/Model/Configuration.php index 5c33566..005db8b 100644 --- a/src/Model/Configuration.php +++ b/src/Model/Configuration.php @@ -258,10 +258,10 @@ public function getContentTypes(StoreInterface $store): array return $configValue ? explode(',', $configValue) : []; } - public function isWhitelistContentTypeWhitelisted(StoreInterface $store, string $contentType): bool + public function isWhitelistContentTypeWhitelisted(StoreInterface $store, ?string $contentType): bool { // safety mechanism for when enabled but no whitelist items are present - if (!$this->isWhitelistEnabled($store) || empty($this->getContentTypes($store))) { + if ($contentType === null || !$this->isWhitelistEnabled($store) || empty($this->getContentTypes($store))) { return true; }