]> git.mxchange.org Git - friendica.git/commitdiff
Add todo for later
authorPhilipp <admin@philipp.info>
Sun, 15 Aug 2021 18:40:23 +0000 (20:40 +0200)
committerPhilipp <admin@philipp.info>
Mon, 16 Aug 2021 21:27:43 +0000 (23:27 +0200)
src/Model/Photo.php

index 8df9b92f2d8e0a0cb891d5a50bb091f84e8f363e..a59c30aca2d854d2e8765bdc82f1aaa1a05ab30c 100644 (file)
@@ -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