don't use potentially bad Profile values
This commit is contained in:
parent
f65fa42e15
commit
8fa816c324
@ -1420,16 +1420,20 @@ class Profile extends Managed_DataObject
|
|||||||
{
|
{
|
||||||
$ids = array();
|
$ids = array();
|
||||||
foreach ($profiles as $profile) {
|
foreach ($profiles as $profile) {
|
||||||
|
if (!empty($profile)) {
|
||||||
$ids[] = $profile->id;
|
$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) {
|
||||||
|
if (!empty($profile)) { // ???
|
||||||
$profile->_fillAvatar($width, $avatars[$profile->id]);
|
$profile->_fillAvatar($width, $avatars[$profile->id]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Can't seem to find how to fix this.
|
// Can't seem to find how to fix this.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user