function onEndShowAccountProfileBlock(HTMLOutputter $out, Profile $profile) {
$user = User::getKV('id', $profile->id);
- if ($user) {
+
+ if ($user instanceof User) {
$url = common_local_url('profiledetail', array('nickname' => $user->nickname));
// TRANS: Link text on user profile page leading to extended profile page.
$out->element('a', array('href' => $url, 'class' => 'profiledetail'), _m('More details...'));