From 2c32af3f24a02cd30ee583c3163051783c797bec Mon Sep 17 00:00:00 2001 From: Nicky Mogensen Date: Thu, 22 Feb 2024 09:34:45 +0100 Subject: [PATCH 1/3] Update functions.php Changed default getDomainExpirationDate value from NULL to MySQL min date to avoid errors when the system in certain situations is unable to lookup the domain expiration date. --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.php b/functions.php index bf46ea319..abfbe09a2 100644 --- a/functions.php +++ b/functions.php @@ -397,7 +397,7 @@ function getDomainExpirationDate($name) } // Default return - return "NULL"; + return "1000-01-01"; } // Get domain general info (whois + NS/A/MX records) From 3b9445c72e4a8436262a240c39688c683796067c Mon Sep 17 00:00:00 2001 From: Nicky Mogensen Date: Thu, 22 Feb 2024 09:41:13 +0100 Subject: [PATCH 2/3] Update functions.php Changed more NULL returns to "1000-01-01" i getDomainExpirationDate function. --- functions.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/functions.php b/functions.php index abfbe09a2..fe1d2d024 100644 --- a/functions.php +++ b/functions.php @@ -373,10 +373,11 @@ function encryptLoginEntry($login_password_cleartext) // Get domain expiration date function getDomainExpirationDate($name) { - + $nullValue = "1000-01-01"; + // Only run if we think the domain is valid if (!filter_var($name, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) { - return "NULL"; + return $nullValue; } $ch = curl_init(); @@ -390,14 +391,14 @@ function getDomainExpirationDate($name) } elseif (isset($response['expiration_date'])) { $expiry = new DateTime($response['expiration_date']); } else { - return "NULL"; + return $nullValue; } - + return $expiry->format('Y-m-d'); } // Default return - return "1000-01-01"; + return $nullValue; } // Get domain general info (whois + NS/A/MX records) From cd35a250f730792451c706dddf4c7e160117c77b Mon Sep 17 00:00:00 2001 From: Nicky Mogensen Date: Thu, 22 Feb 2024 20:54:18 +0100 Subject: [PATCH 3/3] Update functions.php Changed defualt getDomainExpirationDate value from 1000-01-01 to 1970-01-01. --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.php b/functions.php index fe1d2d024..d69cd2bd2 100644 --- a/functions.php +++ b/functions.php @@ -373,7 +373,7 @@ function encryptLoginEntry($login_password_cleartext) // Get domain expiration date function getDomainExpirationDate($name) { - $nullValue = "1000-01-01"; + $nullValue = "1970-01-01"; // Only run if we think the domain is valid if (!filter_var($name, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) {