X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ftoselector.php;h=6d424dc259ccc8433c2e5996cd392bc16fe51dbe;hb=dd61ae8fbeee64c85f8186672292335592be1ff5;hp=f131147dd683ee93f2e6d21e7f1e305a3c376ceb;hpb=19b965d99188fde59cdd39b668df8951bc0f180c;p=quix0rs-gnu-social.git diff --git a/lib/toselector.php b/lib/toselector.php index f131147dd6..6d424dc259 100644 --- a/lib/toselector.php +++ b/lib/toselector.php @@ -94,7 +94,7 @@ class ToSelector extends Widget $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; @@ -145,8 +145,8 @@ class ToSelector extends Widget } break; case 'profile': - $profile = Profile::staticGet('id', $value); - $options['replies'] = $profile->getUri(); + $profile = Profile::getKV('id', $value); + $options['replies'] = array($profile->getUri()); if ($private) { $options['scope'] = Notice::ADDRESSEE_SCOPE; }