From: fabrixxm Date: Fri, 14 Dec 2018 07:31:08 +0000 (+0100) Subject: Method getPhoto of Photo model should return false on error X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bbbc15a5ebd3127909e6fca0a5cc21d84f080ee1;p=friendica.git Method getPhoto of Photo model should return false on error Instead of red circle image, which breaks proxy module --- diff --git a/src/Model/Photo.php b/src/Model/Photo.php index fe84d08a47..88f6d4269b 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -138,9 +138,7 @@ class Photo extends BaseObject $params = ["order" => ["scale" => true]]; $photo = self::selectFirst([], $conditions, $params); - if ($photo === false) { - return self::createPhotoForSystemResource("images/nosign.jpg"); - } + return $photo; } diff --git a/src/Module/Photo.php b/src/Module/Photo.php index 3cf500719f..9277670f62 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -69,6 +69,9 @@ class Photo extends BaseModule $photoid = substr($photoid, 0, -2); } $photo = MPhoto::getPhoto($photoid, $scale); + if ($photo === false) { + $photo = MPhoto::createPhotoForSystemResource("images/nosign.jpg"); + } break; }