]> git.mxchange.org Git - friendica.git/blobdiff - include/Photo.php
Merge pull request #2978 from annando/issue-2518
[friendica.git] / include / Photo.php
index 6a7cc3e52c10e93841be33fa7fa3f09c2e650770..014cca7d25f70d22bc4cf195106f7d06a6cc1179 100644 (file)
@@ -707,11 +707,6 @@ class Photo {
                        );
                }
 
-               // Update the cached values
-               if ($album != 'Contact Photos') {
-                       photo_albums($uid, true);
-               }
-
                return $r;
        }
 }
@@ -872,7 +867,7 @@ function get_photo_info($url) {
 
        $data = Cache::get($url);
 
-       if (is_null($data) OR !$data) {
+       if (is_null($data) OR !$data OR !is_array($data)) {
                $img_str = fetch_url($url, true, $redirects, 4);
                $filesize = strlen($img_str);