Hello!
Fix for this problem will be included to the nearest update.
The correct fix is:
Replace code from your example with:
if ($oProfile = BxDolProfile::getInstance($iProfileId))
$aIcons[] = array(
'id' => $iProfileId,
'icon' => $oProfile->getIcon(),
'name' => $oProfile->getDisplayName(),
);