PHP notice

Trying to access array offset on value of type float

/home/www/demonstrations/demo.sondages.pro/htdocs/application/helpers/qanda_helper.php(2940)

2928         $extraclass      .= " integeronly";
2929         $answertypeclass .= " integeronly";
2930         $integeronly      = 1;
2931     } else {
2932         $integeronly = 0;
2933     }
2934 
2935     $fValue     = $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]];
2936     $sSeparator = getRadixPointData($thissurvey['surveyls_numberformat']);
2937     $sSeparator = $sSeparator['separator'];
2938 
2939     // Fix the display value : Value is stored as decimal in SQL
2940     if($fValue && $fValue[0] == ".") {
2941         // issue #15684 mssql SAVE 0.01 AS .0100000000, set it at 0.0100000000
2942         $fValue = "0" . $fValue;
2943     }
2944     if (strpos($fValue, ".")) {
2945         $fValue = rtrim(rtrim($fValue, "0"), ".");
2946     }
2947     $fValue = str_replace('.', $sSeparator, $fValue);
2948 
2949     if ($thissurvey['nokeyboard'] == 'Y') {
2950         includeKeypad();
2951         $extraclass      .= " inputkeypad";
2952         $answertypeclass .= " num-keypad";

Stack Trace

#0
+
 /home/www/demonstrations/demo.sondages.pro/htdocs/application/helpers/qanda_helper.php(199): do_numerical(array("5944", "561955X366X5944", "Naissance", "Votre année de naissance", ...))
194         case 'K': //MULTIPLE NUMERICAL QUESTION
195             $values = do_multiplenumeric($ia);
196             break;
197 
198         case 'N': //NUMERICAL QUESTION TYPE
199             $values = do_numerical($ia);
200             break;
201 
202         case 'S': //SHORT FREE TEXT
203             $values = do_shortfreetext($ia);
204             break;
#1
+
 /home/www/demonstrations/demo.sondages.pro/htdocs/application/helpers/SurveyRuntimeHelper.php(177): retrieveAnswers(array("5944", "561955X366X5944", "Naissance", "Votre année de naissance", ...))
172                         }
173 
174                         //Get the answers/inputnames
175                         // TMSW - can content of retrieveAnswers() be provided by LEM?  Review scope of what it provides.
176                         // TODO - retrieveAnswers is slow - queries database separately for each question. May be fixed in _CI or _YII ports, so ignore for now
177                         list($plus_qanda, $plus_inputnames) = retrieveAnswers($ia);
178 
179                         if ($plus_qanda) {
180                             $plus_qanda[] = $ia[4];
181                             $plus_qanda[] = $ia[6]; // adds madatory identifyer for adding mandatory class to question wrapping div
182 
#2
+
 /home/www/demonstrations/demo.sondages.pro/htdocs/application/controllers/survey/index.php(595): SurveyRuntimeHelper->run("561955", array("surveyid" => "561955", "thissurvey" => array("htmlemail" => "Y", "format" => "G", "template" => "skelvanilla", "language" => "fr", ...), "thisstep" => "2", "tokensexist" => 0, ...))
590         unset($redata);
591         $redata = compact(array_keys(get_defined_vars()));
592         Yii::import('application.helpers.SurveyRuntimeHelper');
593         $tmp = new SurveyRuntimeHelper();
594         // try {
595             $tmp->run($surveyid, $redata);
596         // } catch (WrongTemplateVersionException $ex) {
597         //     echo $ex->getMessage();
598         // }
599     }
600 
2020-12-10 09:01:02 Apache/2.4.38 (Debian) Yii Framework/1.1.22-dev