]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Photo.php
Insert a `user-contact` for every contact
[friendica.git] / src / Model / Photo.php
index 23e0b9a38c660e67e80649aec41fadd7011a27c4..c09434d7f237a477c80fbb0dc25e63e4643aac8a 100644 (file)
@@ -413,7 +413,7 @@ class Photo
                while ($photo = DBA::fetch($photos)) {
                        try {
                                $backend_class = DI::storageManager()->getWritableStorageByName($photo['backend-class'] ?? '');
-                               $backend_class->delete($item['backend-ref'] ?? '');
+                               $backend_class->delete($photo['backend-ref'] ?? '');
                                // Delete the photos after they had been deleted successfully
                                DBA::delete("photo", ['id' => $photo['id']]);
                        } catch (InvalidClassStorageException $storageException) {
@@ -490,7 +490,7 @@ class Photo
 
                $filename = basename($image_url);
                if (!empty($image_url)) {
-                       $ret = DI::httpRequest()->get($image_url);
+                       $ret = DI::httpClient()->get($image_url);
                        $img_str = $ret->getBody();
                        $type = $ret->getContentType();
                } else {