Update WhoisService.php

This commit is contained in:
Hosteroid
2025-10-21 15:09:03 +03:00
parent 61222ece7c
commit 1ff5bdd5c1

View File

@@ -328,9 +328,14 @@ class WhoisService
curl_close($ch);
// Handle 404 responses as domain not found
if ($httpCode === 404 && $response) {
if ($httpCode === 404) {
$data = null;
if ($response) {
$data = json_decode($response, true);
if ($data && isset($data['errorCode']) && $data['errorCode'] == 404) {
}
// Handle both JSON 404 responses and plain 404 responses
if (($data && isset($data['errorCode']) && $data['errorCode'] == 404) || !$data) {
// Return domain not found response
$rdapHost = parse_url($rdapBaseUrl, PHP_URL_HOST);
return [