]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't use potentially bad Profile values
authorEvan Prodromou <evan@status.net>
Thu, 22 Sep 2011 20:29:31 +0000 (16:29 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 22 Sep 2011 20:29:31 +0000 (16:29 -0400)
classes/Profile.php

index f61803dcd0b331a1f1b0dcbde85b356d52a0bc8c..7f45031f6655a9ea8f0e9198ac83c68470c75b7c 100644 (file)
@@ -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]);
+            }
        }
     }