check for cur before message link

darcs-hash:20080922225620-5ed1f-0dd8e76bcb8850744040e234e04b3182a0e13add.gz
This commit is contained in:
Evan Prodromou 2008-09-22 18:56:20 -04:00
parent ac60342e89
commit c060a84c5b

View File

@ -149,7 +149,7 @@ class ShowstreamAction extends StreamAction {
$user = User::staticGet('id', $profile->id);
if ($cur->id != $user->id && $cur->mutuallySubscribed($user)) {
if ($cur && $cur->id != $user->id && $cur->mutuallySubscribed($user)) {
common_element('a', array('href' => common_local_url('newmessage', array('to' => $user->id))),
_('Send a message'));
}