]> git.mxchange.org Git - friendica.git/commitdiff
Revert Photo::getImageDataForPhoto return-type change
authorPhilipp <admin@philipp.info>
Tue, 10 Aug 2021 19:39:29 +0000 (21:39 +0200)
committerPhilipp <admin@philipp.info>
Mon, 16 Aug 2021 21:27:42 +0000 (23:27 +0200)
src/Model/Photo.php

index f74c68da583c770111212e125245be4c23bafaec..a38743d9d6adbfa5b3d10f13faedabd7b40db9a5 100644 (file)
@@ -185,7 +185,7 @@ class Photo
         *
         * @param array $photo Photo data. Needs at least 'id', 'type', 'backend-class', 'backend-ref'
         *
-        * @return \Friendica\Object\Image|string
+        * @return \Friendica\Object\Image
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
         * @throws StorageException
@@ -201,7 +201,7 @@ class Photo
                        // legacy data storage in "data" column
                        $i = self::selectFirst(['data'], ['id' => $photo['id']]);
                        if ($i === false) {
-                               return '';
+                               return null;
                        }
                        $data = $i['data'];
                } else {
@@ -210,7 +210,7 @@ class Photo
                                $data = $backendClass->get($backendRef);
                        } catch (ReferenceStorageException $referenceStorageException) {
                                DI::logger()->debug('No data found for photo', ['photo' => $photo, 'exception' => $referenceStorageException]);
-                               return '';
+                               return null;
                        }
                }
                return $data;