Standards

This commit is contained in:
Michael 2020-03-08 19:07:36 +00:00
parent 0b8b226ee2
commit 4453e7e47a

View file

@ -144,10 +144,10 @@ class Probe
// Handles the case when the hostname contains the scheme // Handles the case when the hostname contains the scheme
if (!parse_url($host, PHP_URL_SCHEME)) { if (!parse_url($host, PHP_URL_SCHEME)) {
$ssl_url = "https://".$host."/.well-known/host-meta"; $ssl_url = "https://" . $host . "/.well-known/host-meta";
$url = "http://".$host."/.well-known/host-meta"; $url = "http://" . $host . "/.well-known/host-meta";
} else { } else {
$ssl_url = $host."/.well-known/host-meta"; $ssl_url = $host . "/.well-known/host-meta";
$url = ''; $url = '';
} }
@ -168,7 +168,7 @@ class Probe
return false; return false;
} }
if (!is_object($xrd) && ! empty($url)) { if (!is_object($xrd) && !empty($url)) {
$curlResult = Network::curl($url, false, ['timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml']); $curlResult = Network::curl($url, false, ['timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml']);
$connection_error = ($curlResult->getErrorNumber() == CURLE_COULDNT_CONNECT) || ($curlResult->getReturnCode() == 0); $connection_error = ($curlResult->getErrorNumber() == CURLE_COULDNT_CONNECT) || ($curlResult->getReturnCode() == 0);
if ($curlResult->isTimeout()) { if ($curlResult->isTimeout()) {