PHP notice

Undefined variable: cqr

/home/sondages.pro/htdocs/limesurvey_GIT/testing/develop/application/controllers/admin/database.php(1446)

1434                 } else {
1435                     $validAttributes=\ls\helpers\questionHelper::getQuestionAttributesSettings(Yii::app()->request->getPost('type'));
1436 
1437                     // If the question has a custom template, we first check if it provides custom attributes
1438                     $aAttributeValues['question_template'] = 'core';
1439                     if (isset($cqr)){
1440                         $oAttributeValues = QuestionAttribute::model()->find("qid=:qid and attribute='question_template'",array('qid'=>$cqr->qid));
1441                         if (is_object($oAttributeValues && $oAttributeValues->value)){
1442                             $aAttributeValues['question_template'] = $oAttributeValues->value;
1443                         }
1444                     }
1445 
1446                     $validAttributes    = Question::getQuestionTemplateAttributes($validAttributes, $aAttributeValues, $cqr );
1447 
1448                     $aLanguages=array_merge(array(Survey::model()->findByPk($iSurveyID)->language),Survey::model()->findByPk($iSurveyID)->additionalLanguages);
1449                 /* Start to fix some param before save (TODO : use models directly ?) */
1450                 /* Date management */
1451                 Yii::app()->loadHelper('surveytranslator');
1452                 $formatdata=getDateFormatData(Yii::app()->session['dateformat']);
1453                 $startdate = App()->request->getPost('startdate');
1454                 if (trim($startdate)=="")
1455                 {
1456                     $startdate=null;
1457                 }
1458                 else

Stack Trace

#0
+
 /home/sondages.pro/htdocs/limesurvey_GIT/testing/develop/application/controllers/admin/database.php(115): database->actionInsertCopyQuestion("343761")
110         }
111         if ($sAction == "updatesubquestions" && Permission::model()->hasSurveyPermission($iSurveyID, 'surveycontent','update')){
112             $this->actionSubQuestions($iSurveyID);
113         }
114         if (in_array($sAction, array('insertquestion', 'copyquestion')) && Permission::model()->hasSurveyPermission($iSurveyID, 'surveycontent','create')){
115             $this->actionInsertCopyQuestion($iSurveyID);
116         }
117         if ($sAction == "updatequestion" && Permission::model()->hasSurveyPermission($iSurveyID, 'surveycontent','update')){
118             $this->actionUpdateQuestion($iSurveyID);
119         }
120         if (($sAction == "updatesurveylocalesettings") && (Permission::model()->hasSurveyPermission($iSurveyID,'surveylocale','update') || Permission::model()->hasSurveyPermission($iSurveyID,'surveysettings','update'))){
#3
+
 /home/sondages.pro/htdocs/limesurvey_GIT/testing/develop/application/core/Survey_Common_Action.php(86): CAction->runWithParamsInternal(database, ReflectionMethod, array("sa" => "index"))
81             $oMethod = new ReflectionMethod($this, $sDefault);
82         }
83 
84         // We're all good to go, let's execute it
85         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
86         return parent::runWithParamsInternal($this, $oMethod, $params);
87     }
88 
89     /**
90     * Some functions have different parameters, which are just an alias of the
91     * usual parameters we're getting in the url. This function just populates
#7
+
 /home/sondages.pro/htdocs/limesurvey_GIT/testing/develop/application/controllers/AdminController.php(179): CController->run("database")
174                     $this->redirect(array('/admin/authentication/sa/login'));
175                 }
176             }
177         }
178 
179         return parent::run($action);
180     }
181 
182     /**
183     * Routes all the actions to their respective places
184     *
2017-07-05 01:10:12 Apache/2.2.22 (Debian) Yii Framework/1.1.18