From 4d413fbc7b3763f4d2b3a07f9e421796865aea3d Mon Sep 17 00:00:00 2001
From: Eliah REBSTOCK <eliah.rebstock@ensiie.fr>
Date: Fri, 6 May 2016 17:25:41 +0200
Subject: [PATCH] hotfix3 Partie controleur

---
 app/controller/PartieController.php | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/app/controller/PartieController.php b/app/controller/PartieController.php
index 879db23..7b76a61 100644
--- a/app/controller/PartieController.php
+++ b/app/controller/PartieController.php
@@ -265,7 +265,7 @@ class PartieController extends Controller
             header("Location:../add_partie");
 
         $jeu = $_SESSION['jeu_select'];
-        if ($jeu->type = 'equipes') {
+        if ($jeu->type == 'equipes') {
             if (!isset($_SESSION['equipes']))
                 header("Location:stepe1");
         }
@@ -316,11 +316,12 @@ class PartieController extends Controller
         }
         else{
             $joueurs = $_SESSION['joueurs_select'];
-        $ns = count($scores);
-        $nj = count($joueurs);
-        if ($ns != $nj){
+            $ns = count($scores);
+            $nj = count($joueurs);
+            if ($ns != $nj){
             //appeler une fonction d'erreur
-            echo "<h1>Erreur : scores et joueurs incohérents</h1>";
+                print_r($scores);
+                echo "<h1>Erreur : scores et joueurs incohérents</h1>";
             die();
         }
         $pb = Partie::addPartie($joueurs, $scores, $jeu);
-- 
GitLab