X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FParseUrl.php;h=79f427a654df4b5f672bc52f3470ebe01deb2b5b;hb=e1863951986ba5be173758324a00652bc5af870c;hp=33828848391410a843475080905a30d41af1eaa7;hpb=9581b05603e6ee4e250738c159ed2e67b3fb2eeb;p=friendica.git diff --git a/src/Util/ParseUrl.php b/src/Util/ParseUrl.php index 3382884839..79f427a654 100644 --- a/src/Util/ParseUrl.php +++ b/src/Util/ParseUrl.php @@ -70,7 +70,12 @@ class ParseUrl $options = []; } - $curlResult = DI::httpClient()->head($url, array_merge([HttpClientOptions::ACCEPT_CONTENT => $accept], $options)); + try { + $curlResult = DI::httpClient()->head($url, array_merge([HttpClientOptions::ACCEPT_CONTENT => $accept], $options)); + } catch (\Exception $e) { + DI::logger()->debug('Got exception', ['url' => $url, 'message' => $e->getMessage()]); + return []; + } // Workaround for systems that can't handle a HEAD request. Don't retry on timeouts. if (!$curlResult->isSuccess() && ($curlResult->getReturnCode() >= 400) && !in_array($curlResult->getReturnCode(), [408, 504])) {