diff --git a/src/App/Page.php b/src/App/Page.php index 7b3bc286f3..ca98bb6b23 100644 --- a/src/App/Page.php +++ b/src/App/Page.php @@ -30,15 +30,26 @@ class Page implements ArrayAccess /** * @var array Contains all stylesheets, which should get loaded during page */ - private $stylesheets; + private $stylesheets = []; /** * @var array Contains all scripts, which are added to the footer at last */ - private $footerScripts; + private $footerScripts = []; /** * @var array The page content, which are showed directly */ - private $page; + private $page = [ + 'aside' => '', + 'bottom' => '', + 'content' => '', + 'footer' => '', + 'htmlhead' => '', + 'nav' => '', + 'page_title' => '', + 'right_aside' => '', + 'template' => '', + 'title' => '', + ]; /** * @var string The basepath of the page */ @@ -50,19 +61,6 @@ class Page implements ArrayAccess public function __construct(string $basepath) { $this->basePath = $basepath; - - $this->page = [ - 'aside' => '', - 'bottom' => '', - 'content' => '', - 'footer' => '', - 'htmlhead' => '', - 'nav' => '', - 'page_title' => '', - 'right_aside' => '', - 'template' => '', - 'title' => '' - ]; } /** diff --git a/src/Core/ACL.php b/src/Core/ACL.php index 880a1e47ff..3f163216e3 100644 --- a/src/Core/ACL.php +++ b/src/Core/ACL.php @@ -333,6 +333,13 @@ class ACL extends BaseObject // Defaults user permissions if (empty($default_permissions)) { $default_permissions = self::getDefaultUserPermissions($user); + } else { + $default_permissions = [ + 'allow_cid' => $default_permissions['allow_cid'] ?? [], + 'allow_gid' => $default_permissions['allow_gid'] ?? [], + 'deny_cid' => $default_permissions['deny_cid'] ?? [], + 'deny_gid' => $default_permissions['deny_gid'] ?? [], + ]; } if (count($default_permissions['allow_cid']) @@ -352,7 +359,7 @@ class ACL extends BaseObject $pubmail_enabled = false; if (function_exists('imap_open') && !Config::get('system', 'imap_disabled')) { - $mailacct = DBA::selectFirst('mailacct', ['pubmail'], ['`uid` = ? AND `server` != ""', $user['Ășid']]); + $mailacct = DBA::selectFirst('mailacct', ['pubmail'], ['`uid` = ? AND `server` != ""', $user['uid']]); if (DBA::isResult($mailacct)) { $mail_enabled = true; $pubmail_enabled = !empty($mailacct['pubmail']);