From 866338c73bf116a9e1e29f5bf6d0f3a74cfb3687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Garnier?= Date: Sat, 14 Jan 2023 16:35:37 +0100 Subject: [PATCH] test --- Controller/ResoudreGateway.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Controller/ResoudreGateway.php b/Controller/ResoudreGateway.php index a0ae8c31..9bc05964 100644 --- a/Controller/ResoudreGateway.php +++ b/Controller/ResoudreGateway.php @@ -320,7 +320,13 @@ class ResoudreGateway "enigme" => array($enigmeId, SQLITE3_INTEGER), "partie" => array($idPartie, SQLITE3_INTEGER))); $results=$this->con->getResults(); - return $results; + if (empty($results) || $results[0]['classement'] == null) { + return array(null); + } + foreach ($results as $row) { + $classement[] = $row['classement']; + }; + return $classement; } public function getAllByPartieAndUtilisateur(string $mailUtilisateur, int $idPartie) : array{