PHP notice

Undefined variable: defaultWidth

/data/webdev/master/application/core/QuestionTypes/ArrayMultiscale/RenderArrayMultiscale.php(138)

126             $numColExtraAnswer++;
127         } elseif ($shownoanswer) {
128             $columnswidth -= 4;
129             $rightwidth = 4;
130         }
131         if ($centerexists) {
132             $numColExtraAnswer++;
133         } else {
134             $columnswidth -= 4;
135         }
136         if ($numColExtraAnswer > 0) {
137             $extraanswerwidth = $this->answerwidth / $numColExtraAnswer; /* If there are 2 separator : set to 1/2 else to same */
138             if ($defaultWidth) {
139                 $columnswidth -= $this->answerwidth;
140             } else {
141                 $this->answerwidth  = $this->answerwidth / 2;
142             }
143         } else {
144             $extraanswerwidth = $separatorwidth;
145         }
146         $cellwidth = $columnswidth / ($this->numrows ? $this->numrows : 1);
147 
148         // Header row and colgroups
149         $aData['answerwidth'] = $this->answerwidth;
150         $aData['cellwidth'] = $cellwidth;

Stack Trace

#0
+
 /data/webdev/master/application/core/QuestionTypes/ArrayMultiscale/RenderArrayMultiscale.php(403): RenderArrayMultiscale->getPositioningAndSizing(array("coreClass" => "ls-answers subquestion-list questions-list", "basename" => "91424X16X285", "answertypeclass" => " radio", "labelans0" => array("Option 1", "Option 2", "Option 3", "Option 4"), ...))
398         
399         $this->setAnsweroptions();
400         $this->setSubquestions();
401 
402         $this->parseLabelsToArray($aData);
403         $this->getPositioningAndSizing($aData);
404         $this->parseSubquestionsNoDropdown($aData);
405         
406         $answer = Yii::app()->twigRenderer->renderQuestion(
407             $this->getMainView() . '/answer',
408             $aData,
#1
+
 /data/webdev/master/application/core/QuestionTypes/ArrayMultiscale/RenderArrayMultiscale.php(425): RenderArrayMultiscale->renderNoDropdown()
420         $this->aMandatoryViolationSubQ    = ($aLastMoveResult['mandViolation'] && ($this->oQuestion->mandatory == 'Y' || $this->oQuestion->mandatory == 'S'))
421                                         ? explode("|", $aLastMoveResult['unansweredSQs'])
422                                         : [];
423 
424         if ($this->useDropdownLayout === false) {
425             $answer = $this->renderNoDropdown();
426         } else {
427             $answer =  $this->renderDropdown();
428         }
429 
430         $this->registerAssets();
#2
+
 /data/webdev/master/application/helpers/qanda_helper.php(154): RenderArrayMultiscale->render()
149 
150     $oQuestion = Question::model()->findByPk($ia[0]);
151     $oQuestionTemplate = QuestionTemplate::getNewInstance($oQuestion);
152     $oQuestionTemplate->registerAssets(); // Register the custom assets of the question template, if needed
153     $oRenderer = $oQuestion->getRenderererObject($ia);
154     $values = $oRenderer->render();
155 
156 
157     if (isset($values)) {
158         //Break apart $values array returned from switch
159         //$answer is the html code to be printed
2021-07-06 09:43:25 nginx/1.14.2 Yii Framework/1.1.24-dev