Browse Source

Fix Photo::delete()

pull/10667/head
Philipp 10 months ago
parent
commit
fc46744183
No known key found for this signature in database
GPG Key ID: 9A28B7D4FF5667BD
  1. 2
      src/Model/Photo.php

2
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) {

Loading…
Cancel
Save