From 37c53a30f5ab5c3bf80d60c0007731f57565be26 Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Sun, 19 Nov 2017 20:41:35 +0100 Subject: [PATCH] fix: undefined index --- GameEngine/Automation.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index a3f711f6..87dcf0c2 100755 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -4009,8 +4009,14 @@ class Automation { // global $$unit; // $dataarray = $$unit; if($prisoners == 0){ + if (!isset($array['hero'])) { + $array['hero'] = 0; + } $upkeep += $array['hero'] * 6; }else{ + if (!isset($array['t11'])) { + $array['t11'] = 0; + } $upkeep += $array['t11'] * 6; } $who=$database->getVillageField($vid,"owner");