]> git.mxchange.org Git - friendica.git/commitdiff
Fix notices in Parse URL feature
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 16 Oct 2018 22:27:13 +0000 (18:27 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 16 Oct 2018 22:27:13 +0000 (18:27 -0400)
mod/parse_url.php
src/Util/ParseUrl.php

index 40eddc3bdd5053afcd93e1581048d4f13f9baf1f..a14379e7096da14cbb13b86fb022c71dbd7a79b3 100644 (file)
@@ -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'];
                }
index f2a5eccd395247956c9e39a4e22c037d9c0567fa..24089b9cbd2a92bb33c22fe4e41ee3b501987cff 100644 (file)
@@ -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;
                }