PHP notice

Trying to access array offset on value of type bool

E:\WebSite\limesurvey\application\helpers\admin\activate_helper.php(528)

516     global $modifyoutput;
517     Yii::app()->loadHelper("database");
518 
519     // find out the name of the default constraint
520     // Did I already mention that this is the most suckiest thing I have ever seen in MSSQL database?
521     $dfquery = "SELECT c_obj.name AS constraint_name
522     FROM  sys.sysobjects AS c_obj INNER JOIN
523     sys.sysobjects AS t_obj ON c_obj.parent_obj = t_obj.id INNER JOIN
524     sys.sysconstraints AS con ON c_obj.id = con.constid INNER JOIN
525     sys.syscolumns AS col ON t_obj.id = col.id AND con.colid = col.colid
526     WHERE (c_obj.xtype = 'D') AND (col.name = '$fieldname') AND (t_obj.name='{{{$tablename}}}')";
527     $result = dbExecuteAssoc($dfquery)->read();
528     $defaultname = $result['CONTRAINT_NAME'];
529     if ($defaultname != false) {
530         modifyDatabase("", "ALTER TABLE {{{$tablename}}} DROP CONSTRAINT {$defaultname[0]}"); echo $modifyoutput; flush();
531     }
532 }
533 
534 
535 /**
536  * @param string $tablename
537  */
538 function mssql_drop_primary_index($tablename)
539 {
540     Yii::app()->loadHelper("database");

Stack Trace

#0
+
 E:\WebSite\limesurvey\application\helpers\admin\activate_helper.php(449): mssql_drop_constraint("id", "survey_127298")
444     $iAutoNumberStart = Yii::app()->db->createCommand($sQuery)->queryScalar();
445     //if there is an autonumber_start field, start auto numbering here
446     if ($iAutoNumberStart !== false && $iAutoNumberStart > 0) {
447         if (Yii::app()->db->driverName == 'mssql' || Yii::app()->db->driverName == 'sqlsrv' || Yii::app()->db->driverName == 'dblib') {
448             mssql_drop_primary_index('survey_'.$iSurveyID);
449             mssql_drop_constraint('id', 'survey_'.$iSurveyID);
450             $sQuery = "ALTER TABLE {{survey_{$iSurveyID}}} drop column id ";
451             Yii::app()->db->createCommand($sQuery)->execute();
452             $sQuery = "ALTER TABLE {{survey_{$iSurveyID}}} ADD [id] int identity({$iAutoNumberStart},1)";
453             Yii::app()->db->createCommand($sQuery)->execute();
454             // Add back the primaryKey
#1
+
 E:\WebSite\limesurvey\application\controllers\admin\surveyadmin.php(930): activateSurvey(127298)
925                 $survey->savetimings = Yii::app()->request->getPost('savetimings');
926                 $survey->save();
927                 Survey::model()->resetCache(); // Make sure the saved values will be picked up
928             }
929 
930             $aResult = activateSurvey($iSurveyID);
931             $aViewUrls = array();
932             if ((isset($aResult['error']) && $aResult['error'] == 'plugin')
933                 || (isset($aResult['blockFeedback']) && $aResult['blockFeedback'])) {
934                 // Got false from plugin, redirect to survey front-page
935                 $this->getController()->redirect(array('admin/survey', 'sa'=>'view', 'surveyid'=>$iSurveyID));
#4
+
 E:\WebSite\limesurvey\application\core\Survey_Common_Action.php(83): CAction->runWithParamsInternal(SurveyAdmin, ReflectionMethod, array("r" => "admin/survey/sa/activate/surveyid/127298", "sa" => "activate", "surveyid" => "127298", "iSurveyId" => "127298", ...))
78             $oMethod = new ReflectionMethod($this, $sDefault);
79         }
80 
81         // We're all good to go, let's execute it
82         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
83         return parent::runWithParamsInternal($this, $oMethod, $params);
84     }
85 
86     /**
87      * Some functions have different parameters, which are just an alias of the
88      * usual parameters we're getting in the url. This function just populates
2021-12-21 12:40:38 Microsoft-IIS/10.0 Yii Framework/1.1.24-dev