From ceadf6cea485d7fa6aa98acba94819d65ec7c88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Garnier?= Date: Mon, 9 Jan 2023 10:34:44 +0100 Subject: [PATCH] Correction --- WEB/Controller/PartieGateway.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/WEB/Controller/PartieGateway.php b/WEB/Controller/PartieGateway.php index 8f3dcda0..c98b22f3 100644 --- a/WEB/Controller/PartieGateway.php +++ b/WEB/Controller/PartieGateway.php @@ -283,8 +283,12 @@ class PartieGateway ) ); $results = $this->con->getResults(); - $row = $results[0]; - return $row['etat']; + foreach ($results as $row){ + if($row['etat'] == 1){ + return 1; + } + } + return 0; } public function showAll(): void {