fix: undefined index

This commit is contained in:
Martin Ambrus
2017-11-19 02:26:38 +01:00
parent 778f42b4f1
commit 258ba60014
+6 -1
View File
@@ -185,7 +185,12 @@ $to = $database->getMInfo($units[$y]['vref']);
?>
</tr>
<?php
$totalres = $res['wood']+$res['clay']+$res['iron']+$res['crop'];
if (isset($res)) {
$totalres = $res['wood'] + $res['clay'] + $res['iron'] + $res['crop'];
} else {
$totalres = 0;
}
if($units[$y]['attack_type']!=2 and $units[$y]['attack_type']!=1 and $totalres != ""){?>
<tr><th><?php echo BOUNTY;?></th>