X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FPhoto.php;h=c09434d7f237a477c80fbb0dc25e63e4643aac8a;hb=a4b0ab90b1ac32f7cdb875387f511c980dbed9ce;hp=a59c30aca2d854d2e8765bdc82f1aaa1a05ab30c;hpb=0bc677b725ce8f4666ad6774ef6a9fa775a73408;p=friendica.git diff --git a/src/Model/Photo.php b/src/Model/Photo.php index a59c30aca2..c09434d7f2 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -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,11 +490,12 @@ 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 { $img_str = ''; + $type = ''; } if ($quit_on_error && ($img_str == "")) {