From 02a4d30f7d44914a2af50f916d61cf5ec219d0ea Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 15 Aug 2021 20:40:23 +0200 Subject: [PATCH] Add todo for later --- src/Model/Photo.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Model/Photo.php b/src/Model/Photo.php index 8df9b92f2d..a59c30aca2 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -196,13 +196,8 @@ class Photo try { $backendClass = DI::storageManager()->getByName($photo['backend-class'] ?? ''); - $image = $backendClass->get($photo['backend-ref'] ?? ''); - - if ($image instanceof Image) { - return $image; - } else { - DI::logger()->info('Stored data is not an image', ['photo' => $photo]); - } + /// @todo refactoring this returning, because the storage returns a "string" which is casted in different ways - a check "instanceof Image" will fail! + return $backendClass->get($photo['backend-ref'] ?? ''); } catch (InvalidClassStorageException $storageException) { try { // legacy data storage in "data" column