Add todo for later
This commit is contained in:
parent
c06ba3a7c9
commit
02a4d30f7d
1 changed files with 2 additions and 7 deletions
|
@ -196,13 +196,8 @@ class Photo
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$backendClass = DI::storageManager()->getByName($photo['backend-class'] ?? '');
|
$backendClass = DI::storageManager()->getByName($photo['backend-class'] ?? '');
|
||||||
$image = $backendClass->get($photo['backend-ref'] ?? '');
|
/// @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'] ?? '');
|
||||||
if ($image instanceof Image) {
|
|
||||||
return $image;
|
|
||||||
} else {
|
|
||||||
DI::logger()->info('Stored data is not an image', ['photo' => $photo]);
|
|
||||||
}
|
|
||||||
} catch (InvalidClassStorageException $storageException) {
|
} catch (InvalidClassStorageException $storageException) {
|
||||||
try {
|
try {
|
||||||
// legacy data storage in "data" column
|
// legacy data storage in "data" column
|
||||||
|
|
Loading…
Reference in a new issue