From cced063e47878681a03dc287d8d6293b6981db08 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 30 Sep 2013 22:49:47 +0200 Subject: [PATCH] Fixed regression in latest Avatar fixes 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/Profile.php b/classes/Profile.php index 5d8e46a741..a468c99128 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -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! -- 2.39.5