Commit f99c4b7f authored by mmn's avatar mmn

More OOP-ish tests using instanceof

parent e4084d0f
This diff is collapsed.
......@@ -1223,9 +1223,9 @@ function common_relative_profile($sender, $nickname, $dt=null)
}
// If this is a local user, try to find a local user with that nickname.
$sender = User::getKV($sender->id);
if ($sender) {
if ($sender instanceof User) {
$recipient_user = User::getKV('nickname', $nickname);
if ($recipient_user) {
if ($recipient_user instanceof User) {
return $recipient_user->getProfile();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment