Avoid an Invalid argument warning if infolog_bo->anzSubs() returns an integer

This commit is contained in:
nathangray 2016-07-21 13:18:49 -06:00
parent 3b1ce04608
commit 8c26a9b639

View File

@ -1430,9 +1430,13 @@ class infolog_bo
$infos[$row['info_id']]['icon'] = 'infolog/'.$icon;
}
}
foreach($this->anzSubs(array_keys($infos)) as $info_id => $subs)
$anzSubs = $this->anzSubs(array_keys($infos));
if($anzSubs && is_array($anzSubs))
{
if ($subs) $infos[$info_id]['class'] .= ' infolog_rowHasSubs';
foreach($anzSubs as $info_id => $subs)
{
if ($subs) $infos[$info_id]['class'] .= ' infolog_rowHasSubs';
}
}
}
return $infos;