Add another check for $a->user in Content\Nav
- Fix punctuation typo in logging call
This commit is contained in:
parent
01911d9fc6
commit
b4eea625b6
1 changed files with 2 additions and 2 deletions
|
@ -187,7 +187,7 @@ class Nav
|
||||||
'name' => $a->user['username'],
|
'name' => $a->user['username'],
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
DI::logger()->warning('Empty $a->user for local user'. ['local_user' => local_user(), '$a' => $a]);
|
DI::logger()->warning('Empty $a->user for local user', ['local_user' => local_user(), '$a' => $a]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ class Nav
|
||||||
}
|
}
|
||||||
|
|
||||||
// The following nav links are only show to logged in users
|
// The following nav links are only show to logged in users
|
||||||
if (local_user()) {
|
if (local_user() && !empty($a->user)) {
|
||||||
$nav['network'] = ['network', DI::l10n()->t('Network'), '', DI::l10n()->t('Conversations from your friends')];
|
$nav['network'] = ['network', DI::l10n()->t('Network'), '', DI::l10n()->t('Conversations from your friends')];
|
||||||
|
|
||||||
$nav['home'] = ['profile/' . $a->user['nickname'], DI::l10n()->t('Home'), '', DI::l10n()->t('Your posts and conversations')];
|
$nav['home'] = ['profile/' . $a->user['nickname'], DI::l10n()->t('Home'), '', DI::l10n()->t('Your posts and conversations')];
|
||||||
|
|
Loading…
Reference in a new issue