diff --git a/classes/CheckDefenses.php b/classes/CheckDefenses.php index 3286c1c7..da1cd6d7 100644 --- a/classes/CheckDefenses.php +++ b/classes/CheckDefenses.php @@ -244,9 +244,7 @@ public static function fighters(\PDO $pdo_db, string $lang, int $sector, array $ 'regional', 'universal')); // Put the defense information into the array defenses - $num_defenses = 0; $total_sec_fighters = 0; - $owner = true; // Detect if this variable exists, and filter it. // Returns false if anything wasn't right. @@ -257,7 +255,6 @@ public static function fighters(\PDO $pdo_db, string $lang, int $sector, array $ $response = false; } - $defenses = array(); $destination = null; if (array_key_exists('destination', $_REQUEST) === true) { @@ -273,13 +270,8 @@ public static function fighters(\PDO $pdo_db, string $lang, int $sector, array $ // Get sector defense info from database $defenses_gateway = new \Tki\Defenses\DefensesGateway($pdo_db); $defenses_present = $defenses_gateway->selectFighterDefenses($sector); - - // Correct the targetship bug to reflect the player info - $targetship = $playerinfo; - $defenses = array(); $num_defenses = 0; - $total_sector_mines = 0; $owner = true; $i = 0; @@ -502,8 +494,6 @@ public static function mines(\PDO $pdo_db, string $lang, int $sector, string $ti $num_defenses = 0; $total_sector_mines = 0; $owner = true; - $i = 0; - if (!empty($defenses_present)) { foreach ($defenses_present as $current_defense)