From: Hypolite Petovan Date: Sun, 5 Aug 2018 13:55:11 +0000 (+0200) Subject: Fix missing $a->data['user'] in mod/cal X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fb39124301a103e50e71df6ea8433cd61f03484e;p=friendica.git Fix missing $a->data['user'] in mod/cal --- diff --git a/mod/cal.php b/mod/cal.php index 5779b0316a..2cc0b4a592 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -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;