]> git.mxchange.org Git - friendica.git/commitdiff
Fix missing $a->data['user'] in mod/cal
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 5 Aug 2018 13:55:11 +0000 (15:55 +0200)
committerHypolite Petovan <mrpetovan@gmail.com>
Sun, 5 Aug 2018 13:55:11 +0000 (15:55 +0200)
mod/cal.php

index 5779b0316ae570b8a5562ab15423748468c72c89..2cc0b4a592b57be11228aa9ba7ffd87e40cec789 100644 (file)
@@ -29,11 +29,11 @@ function cal_init(App $a)
        }
 
        if (Config::get('system', 'block_public') && !local_user() && !remote_user()) {
-               return;
+               System::httpExit(403, ['title' => L10n::t('Access denied.')]);
        }
 
        if ($a->argc < 2) {
-               System::httpExit(403, ["title" => L10n::t('Access denied.')]);
+               System::httpExit(403, ['title' => L10n::t('Access denied.')]);
        }
 
        Nav::setSelected('events');
@@ -41,7 +41,7 @@ function cal_init(App $a)
        $nick = $a->argv[1];
        $user = DBA::selectFirst('user', [], ['nickname' => $nick, 'blocked' => false]);
        if (!DBA::isResult($user)) {
-               return;
+               System::httpExit(404, ['title' => L10n::t('Page not found.')]);
        }
 
        $a->data['user'] = $user;