]> git.mxchange.org Git - friendica.git/commitdiff
Fix getimagesizefromstring() read errors
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 22 Jul 2018 16:38:53 +0000 (12:38 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Tue, 24 Jul 2018 11:54:12 +0000 (07:54 -0400)
src/Object/Image.php

index aafed8f95d16c6e0c7ff12b2f4cc24f8c2352c32..6a71038fad0f7398991d4853d608f0d2daddcad7 100644 (file)
@@ -782,6 +782,11 @@ class Image
 
                if (is_null($data) || !$data || !is_array($data)) {
                        $img_str = Network::fetchUrl($url, true, $redirects, 4);
+
+                       if (!$img_str) {
+                               return false;
+                       }
+
                        $filesize = strlen($img_str);
 
                        try {