From 9dfefacef9d1e47eee4a1eb7dc72935e2061a7cf Mon Sep 17 00:00:00 2001 From: gnieark Date: Mon, 20 Jun 2016 00:01:35 +0200 Subject: [PATCH] . --- src/arenas/Battleship/act.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arenas/Battleship/act.php b/src/arenas/Battleship/act.php index 7b59991..0f85ffc 100644 --- a/src/arenas/Battleship/act.php +++ b/src/arenas/Battleship/act.php @@ -288,7 +288,8 @@ switch ($_POST['act']){ } - if(!preg_match('/^[0-9]+,[0-9]+$/',$anwserPlayerJson['play'])){ + if ((!isset($anwserPlayerJson['play'])) + OR (!preg_match('/^[0-9]+,[0-9]+$/',$anwserPlayerJson['play']))){ echo json_encode(array( 'target' => '', 'log' => $fullLogs.$currentBot['name']." a fait une réponse non conforme, il perd."));