From fe011a5905bf9d24449b1c64b65450a4b5ebd7d7 Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Thu, 2 Nov 2017 00:19:31 +0100 Subject: [PATCH] fix: undefined index --- GameEngine/Automation.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index e0e39564..658dfef1 100755 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -448,7 +448,9 @@ class Automation { $database->updateAlliPermissions($newleader, $alliance, "Leader", 1, 1, 1, 1, 1, 1, 1); Automation::updateMax($newleader); } - $database->deleteAlliance($alliance); + if (isset($alliance)) { + $database->deleteAlliance($alliance); + } $q = "DELETE FROM ".TB_PREFIX."hero where uid = ".(int) $need['uid']; $database->query($q); $q = "DELETE FROM ".TB_PREFIX."mdata where target = ".(int) $need['uid']." or owner = ".(int) $need['uid'];