1
0
Fork 0

Add checks for $a->user existence

- Variable can be empty/null in many cases
This commit is contained in:
Hypolite Petovan 2020-07-09 15:08:09 -04:00
commit cb03418937
4 changed files with 8 additions and 8 deletions

View file

@ -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";