From c4318fe05e491a45fa8d8c2eacf4541a64588e9c Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 16 Oct 2018 18:27:13 -0400 Subject: [PATCH] Fix notices in Parse URL feature --- mod/parse_url.php | 1 + src/Util/ParseUrl.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.5