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{