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_843642")
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\helpers\admin\import_helper.php(822): activateSurvey("843642")
817                     if ($aImportResults && $aImportResults['newsid']) {
818                         TemplateConfiguration::checkAndcreateSurveyConfig($aImportResults['newsid']);
819                     }
820                     // Activate the survey
821                     Yii::app()->loadHelper("admin/activate");
822                     activateSurvey($aImportResults['newsid']);
823                     unlink(Yii::app()->getConfig('tempdir').DIRECTORY_SEPARATOR.$aFile['filename']);
824                     break;
825                 }
826             }
827 
#2
+
 E:\WebSite\limesurvey\application\controllers\admin\surveyadmin.php(1406): importSurveyFile("E:\WebSite\limesurvey\tmp\q6fgp2x87g9kmk2pxgpk98pe3tb6mc.lsa", true)
1401 
1402             // Now, we have the survey : start importing
1403             Yii::app()->loadHelper('admin/import');
1404 
1405             if ($action == 'importsurvey' && !$aData['bFailed']) {
1406                 $aImportResults = importSurveyFile($sFullFilepath, (Yii::app()->request->getPost('translinksfields') == '1'));
1407                 if (is_null($aImportResults)) {
1408                     $aImportResults = array(
1409                         'error'=>gT("Unknown error while reading the file, no survey created.")
1410                     );
1411                 }
2022-06-14 14:52:07 Microsoft-IIS/10.0 Yii Framework/1.1.24-dev