// prevent looping
- if(intval($_REQUEST,'redir'))
+ if(x($_REQUEST,'redir') && intval($_REQUEST['redir']))
return;
if((! $contact_nick) || ($contact_nick === $a->user['nickname']))
dbesc($nurl)
);
- if((!$r) || (! count($r)) || $r[0]['id'] == remote_user())
+ if((! dbm::is_result($r)) || $r[0]['id'] == remote_user())
return;
dbesc($baseurl)
);
- if(! ($r && count($r)))
+ if(! dbm::is_result($r))
return;
$cid = $r[0]['id'];