Add checks for $a->user existence
- Variable can be empty/null in many cases
This commit is contained in:
parent
ad66a92deb
commit
cb03418937
4 changed files with 8 additions and 8 deletions
|
@ -224,7 +224,7 @@ function frio_remote_nav($a, &$nav)
|
|||
|
||||
// since $userinfo isn't available for the hook we write it to the nav array
|
||||
// this isn't optimal because the contact query will be done now twice
|
||||
if (local_user()) {
|
||||
if (local_user() && !empty($a->user['uid'])) {
|
||||
// empty the server url for local user because we won't need it
|
||||
$server_url = '';
|
||||
// user info
|
||||
|
|
|
@ -27,7 +27,7 @@ function vier_init(App $a)
|
|||
|
||||
Renderer::setActiveTemplateEngine('smarty3');
|
||||
|
||||
if (!empty($a->argv[0]) && ($a->argv[0] . ($a->argv[1] ?? '')) === ('profile' . $a->user['nickname']) || $a->argv[0] === 'network' && local_user()) {
|
||||
if (!empty($a->argv[0]) && ($a->argv[0] . ($a->argv[1] ?? '')) === ('profile' . ($a->user['nickname'] ?? '')) || $a->argv[0] === 'network' && local_user()) {
|
||||
vier_community_info();
|
||||
|
||||
DI::page()['htmlhead'] .= "<link rel='stylesheet' type='text/css' href='view/theme/vier/wide.css' media='screen and (min-width: 1300px)'/>\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue