Skip to content

Commit

Permalink
Reindex array to remove gaps after applying allowed_domains list
Browse files Browse the repository at this point in the history
  • Loading branch information
mobilisedonline committed Jun 6, 2022
1 parent 5750ff2 commit 230c53a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Extension/Embed/DomainFilteringAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public function __construct(EmbedAdapterInterface $decorated, array $allowedDoma
*/
public function updateEmbeds(array $embeds): void
{
$this->decorated->updateEmbeds(\array_filter($embeds, function (Embed $embed): bool {
$this->decorated->updateEmbeds(\array_values(\array_filter($embeds, function (Embed $embed): bool {
return \preg_match($this->regex, $embed->getUrl()) === 1;
}));
})));
}

/**
Expand Down

0 comments on commit 230c53a

Please sign in to comment.