$groups = $this->user->getGroups();
- while ($groups->fetch()) {
+ while ($groups instanceof User_group && $groups->fetch()) {
$value = 'group:'.$groups->id;
if (($this->to instanceof User_group) && $this->to->id == $groups->id) {
$default = $value;
}
break;
case 'profile':
- $profile = Profile::staticGet('id', $value);
+ $profile = Profile::getKV('id', $value);
$options['replies'] = array($profile->getUri());
if ($private) {
$options['scope'] = Notice::ADDRESSEE_SCOPE;