Merge pull request #10667 from nupplaphil/bug/photo_delete

Fix Photo::delete()
pull/10673/head
Tobias Diekershoff 2021-09-05 19:26:06 +02:00 zatwierdzone przez GitHub
commit 093c656003
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

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