PHP notice

Trying to access array offset on value of type int

/data/webdev/master/application/helpers/expressions/em_manager_helper.php(8462)

8450                             if (!preg_match('/_filecount$/', $sq)) {
8451                                 $json = $value;
8452                                 $aFiles = json_decode($json);
8453                                 $iSize = (is_null($aFiles)) ? 0 : @count($aFiles);
8454                                 // if the files have not been saved already,
8455                                 // move the files from tmp to the files folder
8456 
8457                                 $tmp = $LEM->surveyOptions['tempdir'] . 'upload' . DIRECTORY_SEPARATOR;
8458                                 if (!is_null($aFiles) && $iSize > 0) {
8459                                     // Move the (unmoved, temp) files from temp to files directory.
8460                                     // Check all possible file uploads
8461                                     for ($i = 0; $i < $iSize; $i++) {
8462                                         $aFiles[$i]->name = sanitize_filename($aFiles[$i]->name, false, false, true);
8463                                         $aFiles[$i]->filename = get_absolute_path($aFiles[$i]->filename);
8464                                         if (file_exists($tmp . $aFiles[$i]->filename)) {
8465                                             $sDestinationFileName = 'fu_' . randomChars(15);
8466                                             if (!is_dir($LEM->surveyOptions['target'])) {
8467                                                 mkdir($LEM->surveyOptions['target'], 0777, true);
8468                                             }
8469                                             if (!rename($tmp . $aFiles[$i]->filename, $LEM->surveyOptions['target'] . $sDestinationFileName)) {
8470                                                 echo "Error moving file to target destination";
8471                                             }
8472                                             $aFiles[$i]->filename = $sDestinationFileName;
8473                                         }
8474                                     }

Stack Trace

#0
+
 /data/webdev/master/application/helpers/expressions/em_manager_helper.php(5316): LimeExpressionManager::ProcessCurrentResponses()
5311             // NB: No break needed
5312             case 'group':
5313                 // First validate the current group
5314                 $LEM->StartProcessingPage();
5315                 if ($processPOST) {
5316                     $updatedValues = $LEM->ProcessCurrentResponses();
5317                 } else {
5318                     $updatedValues = [];
5319                 }
5320                 $message = '';
5321                 if ($LEM->currentGroupSeq != -1 && $seq > $LEM->currentGroupSeq) { // only re-validate if jumping forward
#1
+
 /data/webdev/master/application/helpers/SurveyRuntimeHelper.php(960): LimeExpressionManager::JumpTo(1, false)
955                         // Save actual page ,
956                         LimeExpressionManager::JumpTo($_SESSION[$this->LEMsessid]['step'], false, true, true);
957                         // Review whole before set finished to true (see #09906), index==1 don't need it because never force move
958                         LimeExpressionManager::JumpTo(0, false, false, true); // no preview, no post and force
959                     }
960                     $this->aMoveResult = LimeExpressionManager::JumpTo($_SESSION[$this->LEMsessid]['totalsteps'] + 1, false);
961                 }
962             }
963             if ($this->sMove == 'clearall') {
964                 $this->manageClearAll();
965             }
#2
+
 /data/webdev/master/application/helpers/SurveyRuntimeHelper.php(647): SurveyRuntimeHelper->setMoveResult()
642         $this->initFirstStep(); // If it's the first time user load this survey, will init session and LEM
643         $this->initTotalAndMaxSteps();
644         $this->checkIfUseBrowserNav(); // Check if user used browser navigation, or relaoded page
645         if ($this->sMove != 'clearcancel' && $this->sMove != 'confirmquota') {
646             $this->checkPrevStep(); // Check if prev step is set, else set it
647             $this->setMoveResult();
648             $this->checkClearCancel();
649             $this->setPrevStep();
650             $this->checkIfFinished();
651             $this->setStep();
652 
2022-05-20 16:46:10 nginx/1.18.0 Yii Framework/1.1.24-dev