]> git.mxchange.org Git - friendica.git/commitdiff
Method getPhoto of Photo model should return false on error
authorfabrixxm <fabrix.xm@gmail.com>
Fri, 14 Dec 2018 07:31:08 +0000 (08:31 +0100)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 21 Jan 2019 14:12:31 +0000 (09:12 -0500)
Instead of red circle image, which breaks proxy module

src/Model/Photo.php
src/Module/Photo.php

index fe84d08a4768a474d0421e48f6c751d3d7a344fe..88f6d4269b3678c991c5681bb76270f83da75837 100644 (file)
@@ -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;
        }
 
index 3cf500719f9e585f64ecd4da8217bf325f7aae2d..9277670f6267cbf58ef97761d69fcdda8a2fa0a8 100644 (file)
@@ -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;
                }