diff --git a/mod/parse_url.php b/mod/parse_url.php index 40eddc3bd..a14379e70 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 f2a5eccd3..24089b9cb 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; }