fix undefined index
This commit is contained in:
parent
81ae9c2e2a
commit
354ab0bcdd
@ -134,8 +134,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
|||||||
/*
|
/*
|
||||||
* Admin Menu
|
* Admin Menu
|
||||||
*/
|
*/
|
||||||
if ($this->maniaControl->getAuthenticationManager()->checkRight($player, AuthenticationManager::AUTH_LEVEL_MODERATOR)
|
if ($this->maniaControl->getAuthenticationManager()->checkRight($player, AuthenticationManager::AUTH_LEVEL_MODERATOR)) {
|
||||||
) {
|
|
||||||
// Admin Menu Icon Frame
|
// Admin Menu Icon Frame
|
||||||
$iconFrame = new Frame();
|
$iconFrame = new Frame();
|
||||||
$manialink->add($iconFrame);
|
$manialink->add($iconFrame);
|
||||||
@ -287,11 +286,11 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
|||||||
*/
|
*/
|
||||||
public function removeMenuItem($order, $playerAction = true) {
|
public function removeMenuItem($order, $playerAction = true) {
|
||||||
if ($playerAction) {
|
if ($playerAction) {
|
||||||
if ($this->playerMenuItems[$order]) {
|
if (isset($this->playerMenuItems[$order])) {
|
||||||
unset($this->playerMenuItems[$order]);
|
unset($this->playerMenuItems[$order]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($this->playerMenuItems[$order]) {
|
if (isset($this->playerMenuItems[$order])) {
|
||||||
unset($this->adminMenuItems[$order]);
|
unset($this->adminMenuItems[$order]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user