Fix undefined property

This commit is contained in:
Jay Trees 2022-03-15 13:06:51 +01:00
parent cd566719c1
commit 1ae229e268

View file

@ -136,7 +136,7 @@ class Page
/** /**
* Power * Power
*/ */
if ($user && $user->power < $this->power) { if (isset($user->power) && $user->power < $this->power) {
header('Location: /?page=power&required=' . $this->power); header('Location: /?page=power&required=' . $this->power);
die(); die();
} }
@ -363,7 +363,7 @@ class Page
global $options; global $options;
if ($options->getOption('updateAvailable') && $user && 100 === $user->power) { if ($options->getOption('updateAvailable') && isset($user->power) && 100 === $user->power) {
$pages[$system]['items'][] = array( $pages[$system]['items'][] = array(
'url' => '/?page=update', 'url' => '/?page=update',
'text' => 'Update', 'text' => 'Update',
@ -371,7 +371,7 @@ class Page
); );
} }
if (100 === $user->power) { if (isset($user->power) && 100 === $user->power) {
$pages[$system]['items'][] = array( $pages[$system]['items'][] = array(
'url' => '/?page=settings', 'url' => '/?page=settings',
'text' => 'Settings', 'text' => 'Settings',