From: Vincent Vanwaelscappel Date: Tue, 30 Jul 2024 12:07:46 +0000 (+0200) Subject: wait #7025 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=af447f3c4f2fdca8977e2122d6cd91a83e1de3a3;p=cubist_net.git wait #7025 @0.25 --- diff --git a/src/Transfer/Local.php b/src/Transfer/Local.php index c2bc355..ea88960 100644 --- a/src/Transfer/Local.php +++ b/src/Transfer/Local.php @@ -76,25 +76,27 @@ class Local extends Driver } public function checkConnexion($data = []) { - $hosting = $data['protocol'] === 'hosting' ? 'hosting.fluidbook.com' : 'hosting2.fluidbook.com'; - $ipHosting = dns_get_record($hosting, DNS_A)[0]['ip']; - - $subdomains = explode("\r\n",$data['subdomains']); - $subdomainsIntruder = []; - - if($subdomains) { - foreach($subdomains as $subdomain) { - $ipSubdomain = dns_get_record($subdomain, DNS_A)[0]['ip']; - $ipSubdomain = trim(str_replace('\n', '', shell_exec('dig +short @1.1.1.1 '.$subdomain.' | tail -1'))); - if($ipSubdomain !== $ipHosting) { - $subdomainsIntruder[] = $subdomain; + if(isset($data['protocol']) && isset($data['subdomains'])) { + $hosting = $data['protocol'] === 'hosting' ? 'hosting.fluidbook.com' : 'hosting2.fluidbook.com'; + $ipHosting = dns_get_record($hosting, DNS_A)[0]['ip']; + + $subdomains = explode("\r\n", $data['subdomains']); + $subdomainsIntruder = []; + + if ($subdomains) { + foreach ($subdomains as $subdomain) { + $ipSubdomain = dns_get_record($subdomain, DNS_A)[0]['ip']; + $ipSubdomain = trim(str_replace('\n', '', shell_exec('dig +short @1.1.1.1 ' . $subdomain . ' | tail -1'))); + if ($ipSubdomain !== $ipHosting) { + $subdomainsIntruder[] = $subdomain; + } } } - } - if($subdomainsIntruder) { - $subdomainsList = implode(", ",$subdomainsIntruder); - return ['subdomains' => $subdomainsList, 'host' => $hosting]; + if ($subdomainsIntruder) { + $subdomainsList = implode(", ", $subdomainsIntruder); + return ['subdomains' => $subdomainsList, 'host' => $hosting]; + } } if(file_exists($this->getRootPath().'status')) {