mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: some pendingDelete domains are already expired
This commit is contained in:
@@ -351,10 +351,7 @@ class WatchListController extends AbstractController
|
|||||||
/** @var DomainEvent|null $exp */
|
/** @var DomainEvent|null $exp */
|
||||||
$exp = $domain->getEvents()->findFirst(fn (int $key, DomainEvent $e) => !$e->getDeleted() && 'expiration' === $e->getAction());
|
$exp = $domain->getEvents()->findFirst(fn (int $key, DomainEvent $e) => !$e->getDeleted() && 'expiration' === $e->getAction());
|
||||||
|
|
||||||
if (!$domain->getDeleted()
|
if (!$domain->getDeleted() && null !== $exp && !in_array($domain, $domains)) {
|
||||||
&& null !== $exp && $exp->getDate() > new \DateTimeImmutable()
|
|
||||||
&& count(array_filter($domain->getEvents()->toArray(), fn (DomainEvent $e) => !$e->getDeleted() && 'expiration' === $e->getAction())) > 0
|
|
||||||
&& !in_array($domain, $domains)) {
|
|
||||||
$domains[] = $domain;
|
$domains[] = $domain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user