From 812f87c22e57266fe1358ddb190142f06e33bae6 Mon Sep 17 00:00:00 2001 From: Li Chen Date: Wed, 11 Dec 2013 19:16:51 +0100 Subject: [PATCH] Exercice.class.php: Fixed intval in exercice id --- onyx/include/common/Exercice.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/onyx/include/common/Exercice.class.php b/onyx/include/common/Exercice.class.php index 8d8bf053..48010ae2 100644 --- a/onyx/include/common/Exercice.class.php +++ b/onyx/include/common/Exercice.class.php @@ -135,12 +135,14 @@ class Exercice do { array_push($checked, $exo); - $res = $db->unique_query("SELECT `require` FROM exercices WHERE id = ".intval($exo)); + $res = $db->unique_query("SELECT `require` FROM exercices WHERE id = ".$exo); $exo = $res['require']; $ret++; } while ($exo != "" && !in_array($exo, $checked)); $this->number = $ret; + + $db->deconnexion(); } function update($create)