]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Images.php
Return empty array on error (I hope it works this way).
[friendica.git] / src / Util / Images.php
index 9f36f9063ea07a9bcf2ee0077f3110fe9b346ff4..c36ce26899886c446857d70df7c86c37433ae54b 100644 (file)
@@ -201,11 +201,12 @@ class Images
                        DI::cache()->set($cacheKey, $data);
                }
 
-               return $data;
+               return $data ?? [];
        }
 
        /**
         * Gets info from URL uncached
+        *
         * @param string $url URL
         * @return array Info array
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
@@ -246,7 +247,7 @@ class Images
                        $data['size'] = $filesize;
                }
 
-               return $data;
+               return $data ?? [];
        }
 
        /**