mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: a domain may not have status
This commit is contained in:
@@ -87,11 +87,9 @@ readonly class RDAPService
|
||||
$domain = $this->domainRepository->findOneBy(["ldhName" => strtolower($res['ldhName'])]);
|
||||
if ($domain === null) $domain = new Domain();
|
||||
|
||||
$domain
|
||||
->setTld($tld)
|
||||
->setLdhName($res['ldhName'])
|
||||
->setStatus($res['status']);
|
||||
$domain->setTld($tld)->setLdhName($res['ldhName']);
|
||||
|
||||
if (array_key_exists('status', $res)) $domain->setStatus($res['status']);
|
||||
if (array_key_exists('handle', $res)) $domain->setHandle($res['handle']);
|
||||
|
||||
$this->em->persist($domain);
|
||||
|
||||
Reference in New Issue
Block a user