don't use potentially bad Profile values

This commit is contained in:
Evan Prodromou 2011-09-22 16:29:31 -04:00
parent f65fa42e15
commit 8fa816c324
1 changed files with 6 additions and 2 deletions

View 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]);
}
}
}