PHP notice

Trying to access array offset on value of type bool

/mnt/data/shnoulle/nginx/www/3LTS/application/models/SurveyDynamic.php(786)

774      * @return array | boolean
775      */
776     public function getQuestionArray($oQuestion, $oResponses, $bHonorConditions, $subquestion = false, $getComment = false)
777     {
778 
779         $attributes = QuestionAttribute::model()->getQuestionAttributes($oQuestion->qid);
780 
781         /* Question is irrelevant , check printanswershonorsconditions */
782         if ($bHonorConditions && !LimeExpressionManager::QuestionIsRelevant($oQuestion->qid)) {
783             return false;
784         }
785         /* Question is hideen to participant : never show */
786         if ($attributes['hidden']) {
787             return false;
788         }
789 
790         $aQuestionAttributes = $oQuestion->attributes;
791         $aQuestionAttributes['questionSrc'] = $oQuestion->question;
792         $result = LimeExpressionManager::ProcessString($oQuestion->question, 40, NULL, 1, 1);
793         $aQuestionAttributes['question'] = $result;
794 
795         $aQuestionAttributes['helpSrc'] = $oQuestion->help;
796         $result = LimeExpressionManager::ProcessString($oQuestion->help, 40, NULL, 1, 1);
797         $aQuestionAttributes['help'] = $result;
798 

Stack Trace

#0
+
 /mnt/data/shnoulle/nginx/www/3LTS/application/models/SurveyDynamic.php(836): SurveyDynamic->getQuestionArray(Question, SurveyDynamic, 1, true)
831                     "parent_qid" => $oQuestion->qid,
832                     "qid" => "other",
833                     "question" => !empty($attributes['other_replace_text'][$oQuestion->language]) ? $attributes['other_replace_text'][$oQuestion->language] : gT("Other"),
834                     "title" => "other",
835                 ), false);
836                 $aQuestionAttributes['subquestions']["other"] = $this->getQuestionArray($oOtherQuestion, $oResponses,  $bHonorConditions, true);
837                 if ($oQuestion->type == "P") {
838                     $aQuestionAttributes['subquestions']["other"]['comment'] = $this->getQuestionArray($oOtherQuestion, $oResponses, $bHonorConditions, true, true);
839                 }
840             }
841         }
#1
+
 /mnt/data/shnoulle/nginx/www/3LTS/application/models/SurveyDynamic.php(994): SurveyDynamic->getQuestionArray(Question, SurveyDynamic, 1)
989             }
990 
991             $aAnswersArray = array();
992             $aQuestionArray = array_filter($oGroup->questions, function($oQuestion) use ($sLanguage) { return $oQuestion->language == $sLanguage;});
993             foreach ( $aQuestionArray as $oQuestion) {
994                 $aQuestionArray = $this->getQuestionArray($oQuestion, $oResponses, $bHonorConditions);
995 
996                 if ($aQuestionArray === false) {
997                     continue;
998                 }
999 
#2
+
 /mnt/data/shnoulle/nginx/www/3LTS/application/controllers/PrintanswersController.php(126): SurveyDynamic->getPrintAnswersArray("1", "en", 1)
121         $sAnonymized = $aSurveyInfo['anonymized'];
122         //OK. IF WE GOT THIS FAR, THEN THE SURVEY EXISTS AND IT IS ACTIVE, SO LETS GET TO WORK.
123         //SHOW HEADER
124         $oResponseRow = SurveyDynamic::model($iSurveyID);
125         $printanswershonorsconditions = Yii::app()->getConfig('printanswershonorsconditions');
126         $groupArray = $oResponseRow->getPrintAnswersArray($sSRID, $sLanguage, $printanswershonorsconditions);
127 
128         // Remove all <script>...</script> content from result.
129         Yii::import('application.helpers.viewHelper');
130         foreach ($groupArray as &$group) {
131             $group['description'] = viewHelper::purified($group['description']);
2020-06-18 14:34:10 nginx/1.18.0 Yii Framework/1.1.22-dev