Exercice.class.php: Fixed intval in exercice id

This commit is contained in:
Li Chen 2013-12-11 19:16:51 +01:00
parent 2b88c05dd7
commit 812f87c22e

View File

@ -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)