Skip to content

Commit

Permalink
content type is not required
Browse files Browse the repository at this point in the history
  • Loading branch information
roelofelgentos authored and peterjaap committed Feb 13, 2025
1 parent 1e1f87c commit 64f1334
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Model/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 64f1334

Please sign in to comment.