Fix undefined property
This commit is contained in:
parent
cd566719c1
commit
1ae229e268
1 changed files with 3 additions and 3 deletions
|
@ -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',
|
||||||
|
|
Loading…
Reference in a new issue