From 345b3cbfc8f21d14a31d8d9d8af0fbf16c14bfc7 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 25 Nov 2020 11:38:58 +0100 Subject: [PATCH] fix survey --- htdocs/opensurvey/wizard/choix_autre.php | 7 ++----- htdocs/opensurvey/wizard/create_survey.php | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index 248c44aeddd..42213af2ae2 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -43,10 +43,10 @@ $arrayoftypecolumn = GETPOST('typecolonne', 'array'); if (isset($_SESSION["nbrecases"])) { for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) { if (isset($arrayofchoices[$i])) { - $_SESSION["choix$i"] = $arrayofchoices[$i]; + $_SESSION["choix".$i] = $arrayofchoices[$i]; } if (isset($arrayoftypecolumn[$i])) { - $_SESSION["typecolonne$i"] = $arrayoftypecolumn[$i]; + $_SESSION["typecolonne".$i] = $arrayoftypecolumn[$i]; } } } else { //nombre de cases par défaut @@ -97,9 +97,6 @@ if (GETPOSTISSET("confirmecreation")) } } -var_dump($_SESSION); exit; - - /* * View */ diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index 1ae5699500b..e2c3ddc67fd 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -40,7 +40,7 @@ $langs->load("opensurvey"); $post_var = array('title', 'description', 'mailsonde', 'creation_sondage_date', 'creation_sondage_autre'); foreach ($post_var as $var) { - $$var = GETPOST($var); + ${$var} = GETPOST($var); } // On initialise egalement la session car sinon bonjour les warning :-)