don't use potentially bad Profile values
This commit is contained in:
parent
f65fa42e15
commit
8fa816c324
@ -1420,14 +1420,18 @@ class Profile extends Managed_DataObject
|
|||||||
{
|
{
|
||||||
$ids = array();
|
$ids = array();
|
||||||
foreach ($profiles as $profile) {
|
foreach ($profiles as $profile) {
|
||||||
$ids[] = $profile->id;
|
if (!empty($profile)) {
|
||||||
|
$ids[] = $profile->id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$avatars = Avatar::pivotGet('profile_id', $ids, array('width' => $width,
|
$avatars = Avatar::pivotGet('profile_id', $ids, array('width' => $width,
|
||||||
'height' => $width));
|
'height' => $width));
|
||||||
|
|
||||||
foreach ($profiles as $profile) {
|
foreach ($profiles as $profile) {
|
||||||
$profile->_fillAvatar($width, $avatars[$profile->id]);
|
if (!empty($profile)) { // ???
|
||||||
|
$profile->_fillAvatar($width, $avatars[$profile->id]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user