]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fixed regression in latest Avatar fixes
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 30 Sep 2013 20:49:47 +0000 (22:49 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 30 Sep 2013 20:49:47 +0000 (22:49 +0200)
I thought typing would fix it, but there's a problem earlier in the
execution chain which will be fixed in the future.

classes/Profile.php

index 5d8e46a7410d161b493477b26a6ae760238164c6..a468c9912875fc37ef3436e5ebd9cc87a8d2646a 100644 (file)
@@ -174,10 +174,12 @@ class Profile extends Managed_DataObject
         return null;
     }
 
-    protected function _fillAvatar($width, Avatar $avatar)
+    protected function _fillAvatar($width, $avatar)
     {
         // This avoids storing null values, a problem report in issue #3478
-           $this->_avatars[$width] = $avatar;
+        if (!empty($avatar)) {
+           $this->_avatars[$width] = $avatar;
+        }
     }
 
     // For backwards compatibility only!