From e35a278b727931e8cebed8e637b88e524a87bc49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Mon, 18 Nov 2024 11:49:14 +0900 Subject: [PATCH] cfmgrv4 init...4 --- app/Services/Cloudflare/ZoneService.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Services/Cloudflare/ZoneService.php b/app/Services/Cloudflare/ZoneService.php index b13b20a..286a42a 100644 --- a/app/Services/Cloudflare/ZoneService.php +++ b/app/Services/Cloudflare/ZoneService.php @@ -162,11 +162,13 @@ class ZoneService extends CloudflareService public function expire(ZoneEntity $entity): void { $whois = Factory::get()->createWhois(); - $info = $whois->loadDomainInfo($entity->getTitle()); - if ($info) { + if ($whois->isDomainAvailable($entity->getTitle())) { + $info = $whois->loadDomainInfo($entity->getTitle()); $expire_date = date("Y-m-d", $info->expirationDate); $this->getModel()->modify($entity, ['expire_date' => $expire_date]); log_message('debug', __FUNCTION__ . " : {$entity->getTitle()} => {$expire_date}"); + } else { + log_message('debug', "{$entity->getTitle()} 이 도메인은 등록되지 않았습니다."); } }