PHP notice

Array to string conversion

/data/webdev/master/framework/db/schema/CDbColumnSchema.php(146)

134      * Converts the input value to the type that this column is of.
135      * @param mixed $value input value
136      * @return mixed converted value
137      */
138     public function typecast($value)
139     {
140         if(gettype($value)===$this->type || $value===null || $value instanceof CDbExpression)
141             return $value;
142         if($value==='' && $this->allowNull)
143             return $this->type==='string' ? '' : null;
144         switch($this->type)
145         {
146             case 'string': return (string)$value;
147             case 'integer': return (integer)$value;
148             case 'boolean': return (boolean)$value;
149             case 'double':
150             default: return $value;
151         }
152     }
153 }

Stack Trace

#1
+
–
 /data/webdev/master/framework/db/ar/CActiveRecord.php(1082): CDbCommandBuilder->createInsertCommand(CMysqlTableSchema, array("name" => "arrayTextArea", "visible" => "Y", "xml_path" => "upload/themes/question/arrayTextArea/survey/questions/answer/arr...", "image_path" => "/upload/themes/question/arrayTextArea/survey/questions/answer/ar...", ...))
1077         if($this->beforeSave())
1078         {
1079             Yii::trace(get_class($this).'.insert()','system.db.ar.CActiveRecord');
1080             $builder=$this->getCommandBuilder();
1081             $table=$this->getTableSchema();
1082             $command=$builder->createInsertCommand($table,$this->getAttributes($attributes));
1083             if($command->execute())
1084             {
1085                 $primaryKey=$table->primaryKey;
1086                 if($table->sequenceName!==null)
1087                 {
#2
+
–
 /data/webdev/master/framework/db/ar/CActiveRecord.php(811): CActiveRecord->insert(null)
806      * @return boolean whether the saving succeeds
807      */
808     public function save($runValidation=true,$attributes=null)
809     {
810         if(!$runValidation || $this->validate($attributes))
811             return $this->getIsNewRecord() ? $this->insert($attributes) : $this->update($attributes);
812         else
813             return false;
814     }
815 
816     /**
#3
+
–
 /data/webdev/master/application/models/QuestionTheme.php(284): CActiveRecord->save()
279         /** @var array<string, mixed> */
280         // todo proper error handling should be done before in getQuestionMetaData via validate()
281         $aMetaDataArray = self::getMetaDataArray($aQuestionMetaData);
282 
283         $this->setAttributes($aMetaDataArray, false);
284         if ($this->save()) {
285             return $aQuestionMetaData['title'];
286         } else {
287             throw new Exception('Could not save question theme metadata: ' . json_encode($this->errors));
288         }
289     }
#4
+
–
 /data/webdev/master/application/libraries/ExtensionInstaller/QuestionThemeInstaller.php(42): QuestionTheme->importManifest("upload/themes/question/arrayTextArea/survey/questions/answer/arr...", false, true)
37             $questionTheme = new QuestionTheme();
38             $xmlFolder = $this->getXmlFolder($destdir);
39             if (empty($xmlFolder)) {
40                 throw new Exception('Found no xml folder for question theme');
41             }
42             $questionTheme->importManifest($xmlFolder, false, true);
43             $this->fileFetcher->abort();
44         } else {
45             throw new Exception('Could not move files.');
46         }
47 
#5
+
–
 /data/webdev/master/application/controllers/admin/themes.php(313): LimeSurvey\ExtensionInstaller\QuestionThemeInstaller->install()
308                     throw new Exception(gT('The question theme is not compatible with your version of LimeSurvey.'));
309                 }
310                 $questionTheme = QuestionTheme::model()->findByAttributes(['name' => $config->getName()]);
311                 try {
312                     if (empty($questionTheme)) {
313                         $installer->install();
314                     } else {
315                         $installer->update();
316                     }
317                     // TODO: If you want to do nice file upload summary, you need to define a
318                     // FileFetcherResult and return it from install().
2021-10-28 11:04:15 nginx/1.18.0 Yii Framework/1.1.24-dev
Journal d'application
Heure Niveau Categorie Message
11:04:15.522433 error php
Array to string conversion
(/data/webdev/master/framework/db/schema/CDbColumnSchema.php:146)
Stack trace:
#0 /data/webdev/master/framework/db/ar/CActiveRecord.php(811):
QuestionTheme->insert()
#1 /data/webdev/master/application/models/QuestionTheme.php(284):
QuestionTheme->save()
#2
/data/webdev/master/application/libraries/ExtensionInstaller/QuestionThemeInstaller.php(42):
QuestionTheme->importManifest()
#3 /data/webdev/master/application/controllers/admin/themes.php(313):
LimeSurvey\ExtensionInstaller\QuestionThemeInstaller->install()
#4 /data/webdev/master/application/controllers/admin/themes.php(186):
themes->uploadTemplate()
#5 unknown(0): themes->upload()
#6 /data/webdev/master/framework/web/actions/CAction.php(115):
ReflectionMethod->invokeArgs()
#7 /data/webdev/master/application/core/Survey_Common_Action.php(86):
themes->runWithParamsInternal()
#8 /data/webdev/master/application/controllers/admin/themes.php(32):
themes->runWithParams()
#9 /data/webdev/master/framework/web/CController.php(308):
themes->runWithParams()
#10 /data/webdev/master/framework/web/CController.php(286):
AdminController->runAction()
#11 /data/webdev/master/framework/web/CController.php(265):
AdminController->runActionWithFilters()
#12 /data/webdev/master/application/controllers/AdminController.php(202):
AdminController->run()
#13 /data/webdev/master/framework/web/CWebApplication.php(282):
AdminController->run()
#14 /data/webdev/master/framework/web/CWebApplication.php(141):
LSYii_Application->runController()
#15 /data/webdev/master/framework/base/CApplication.php(185):
LSYii_Application->processRequest()
#16 /data/webdev/master/index.php(192): LSYii_Application->run()
REQUEST_URI=/master/index.php?r=admin/themes/sa/upload