Merge pull request #9370 from annando/notice

Fix notice "Undefined offset: 1"
This commit is contained in:
Hypolite Petovan 2020-10-05 18:03:48 -04:00 committed by GitHub
commit 24cbbd72a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,7 +132,7 @@ function network_init(App $a)
DI::page()['aside'] = '';
}
if (in_array($a->argv[1], ['person', 'organisation', 'news', 'community'])) {
if (!empty($a->argv[1]) && in_array($a->argv[1], ['person', 'organisation', 'news', 'community'])) {
$accounttype = $a->argv[1];
} else {
$accounttype = '';