From: Evan Prodromou Date: Thu, 22 Sep 2011 20:29:31 +0000 (-0400) Subject: don't use potentially bad Profile values X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8fa816c32450c9bbe1a9c306835ad97e3eca5be6;p=quix0rs-gnu-social.git don't use potentially bad Profile values --- diff --git a/classes/Profile.php b/classes/Profile.php index f61803dcd0..7f45031f66 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -1420,14 +1420,18 @@ class Profile extends Managed_DataObject { $ids = array(); foreach ($profiles as $profile) { - $ids[] = $profile->id; + if (!empty($profile)) { + $ids[] = $profile->id; + } } $avatars = Avatar::pivotGet('profile_id', $ids, array('width' => $width, 'height' => $width)); foreach ($profiles as $profile) { - $profile->_fillAvatar($width, $avatars[$profile->id]); + if (!empty($profile)) { // ??? + $profile->_fillAvatar($width, $avatars[$profile->id]); + } } }