Avoid "property of non-object" PHP notice.

This commit is contained in:
Mikael Nordfeldth 2016-03-21 11:17:25 +01:00
parent 51ef894a47
commit 38f7deca78
1 changed files with 2 additions and 1 deletions

View File

@ -105,7 +105,8 @@ class PeopletagGroupNav extends Widget
$this->out->elementStart('ul', array('class' => 'nav'));
if (Event::handle('StartPeopletagGroupNav', array($this))) {
if (Event::handle('StartPeopletagGroupNav', array($this))
&& $tag instanceof Profile_list && $user_profile instanceof Profile) {
// People tag timeline
$this->out->menuItem(common_local_url('showprofiletag', array('nickname' => $user_profile->nickname,
'tag' => $tag->tag)),