Fix Photo::delete()
This commit is contained in:
parent
4e328b0a78
commit
fc46744183
|
@ -413,7 +413,7 @@ class Photo
|
||||||
while ($photo = DBA::fetch($photos)) {
|
while ($photo = DBA::fetch($photos)) {
|
||||||
try {
|
try {
|
||||||
$backend_class = DI::storageManager()->getWritableStorageByName($photo['backend-class'] ?? '');
|
$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
|
// Delete the photos after they had been deleted successfully
|
||||||
DBA::delete("photo", ['id' => $photo['id']]);
|
DBA::delete("photo", ['id' => $photo['id']]);
|
||||||
} catch (InvalidClassStorageException $storageException) {
|
} catch (InvalidClassStorageException $storageException) {
|
||||||
|
|
Loading…
Reference in a new issue