Add todo for later

This commit is contained in:
Philipp Holzer 2021-08-15 20:40:23 +02:00
parent c06ba3a7c9
commit 02a4d30f7d
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD

View 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