function ostatusConnect()
{
+ $validate = new Validate();
$opts = array('allowed_schemes' => array('http', 'https', 'acct'));
- if (Validate::uri($this->profile, $opts)) {
+ if ($validate->uri($this->profile, $opts)) {
$bits = parse_url($this->profile);
if ($bits['scheme'] == 'acct') {
$this->connectWebfinger($bits['path']);
}
} else if ($this->group) {
$group = Local_group::getKV('nickname', $this->group);
- if ($group) {
+ if ($group instanceof Local_group) {
return common_local_url('groupbyid', array('id' => $group->group_id));
} else {
// TRANS: Client error.