From: Hypolite Petovan Date: Tue, 16 Oct 2018 22:27:13 +0000 (-0400) Subject: Fix notices in Parse URL feature X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c4318fe05e491a45fa8d8c2eacf4541a64588e9c;p=friendica.git Fix notices in Parse URL feature --- diff --git a/mod/parse_url.php b/mod/parse_url.php index 40eddc3bdd..a14379e709 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -73,6 +73,7 @@ function parse_url_content(App $a) $hdrs[$k] = $v; } } + $type = null; if (array_key_exists('Content-Type', $hdrs)) { $type = $hdrs['Content-Type']; } diff --git a/src/Util/ParseUrl.php b/src/Util/ParseUrl.php index f2a5eccd39..24089b9cbd 100644 --- a/src/Util/ParseUrl.php +++ b/src/Util/ParseUrl.php @@ -141,7 +141,7 @@ class ParseUrl } // If the file is too large then exit - if ($curlResult->getInfo()['download_content_length'] > 1000000) { + if (defaults($curlResult->getInfo(), 'download_content_length', 0) > 1000000) { return $siteinfo; }