/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 }
| #0 |
+
–
/data/webdev/master/framework/db/schema/CDbCommandBuilder.php(229): CDbColumnSchema->typecast(array()) 224 $values[$n]=$v; 225 } 226 else 227 { 228 $placeholders[]=self::PARAM_PREFIX.$i; 229 $values[self::PARAM_PREFIX.$i]=$column->typecast($value); 230 $i++; 231 } 232 } 233 } 234 if($fields===array()) |
| #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(). |
| #6 |
+
–
/data/webdev/master/application/controllers/admin/themes.php(186): themes->uploadTemplate() 181 // NB: lid = label id 182 $lid = returnGlobal('lid'); 183 if ($action == 'templateuploadimagefile') { 184 return $this->uploadTemplateImageFile($sTemplateName); 185 } elseif ($action == 'templateupload') { 186 $aData = $this->uploadTemplate(); 187 $aViewUrls = 'importuploaded_view'; 188 } else { 189 $aViewUrls = 'importform_view'; 190 $aData = array('lid' => $lid); 191 } |
| #7 |
unknown(0): themes->upload()
|
| #8 |
+
–
/data/webdev/master/framework/web/actions/CAction.php(115): ReflectionMethod->invokeArgs(themes, array()) 110 elseif($param->isDefaultValueAvailable()) 111 $ps[]=$param->getDefaultValue(); 112 else 113 return false; 114 } 115 $method->invokeArgs($object,$ps); 116 return true; 117 } 118 } |
| #9 |
+
–
/data/webdev/master/application/core/Survey_Common_Action.php(86): CAction->runWithParamsInternal(themes, ReflectionMethod, array("r" => "admin/themes/sa/upload", "sa" => "upload", "sAction" => "templateupload")) 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 |
| #10 |
+
–
/data/webdev/master/application/controllers/admin/themes.php(32): Survey_Common_Action->runWithParams(array("r" => "admin/themes/sa/upload", "sa" => "upload", "sAction" => "templateupload")) 27 28 public function runWithParams($params) 29 { 30 $sTemplateName = Yii::app()->request->getPost('templatename', ''); 31 if (Permission::model()->hasGlobalPermission('templates', 'read') || Permission::model()->hasTemplatePermission($sTemplateName)) { 32 parent::runWithParams($params); 33 } else { 34 Yii::app()->setFlashMessage(gT("We are sorry but you don't have permissions to do this."), 'error'); 35 $this->getController()->redirect(array("themeOptions/index")); 36 } 37 } |
| #11 |
+
–
/data/webdev/master/framework/web/CController.php(308): themes->runWithParams(array("r" => "admin/themes/sa/upload", "sa" => "upload")) 303 { 304 $priorAction=$this->_action; 305 $this->_action=$action; 306 if($this->beforeAction($action)) 307 { 308 if($action->runWithParams($this->getActionParams())===false) 309 $this->invalidActionParams($action); 310 else 311 $this->afterAction($action); 312 } 313 $this->_action=$priorAction; |
| #12 |
+
–
/data/webdev/master/framework/web/CController.php(286): CController->runAction(themes) 281 * @see runAction 282 */ 283 public function runActionWithFilters($action,$filters) 284 { 285 if(empty($filters)) 286 $this->runAction($action); 287 else 288 { 289 $priorAction=$this->_action; 290 $this->_action=$action; 291 CFilterChain::create($this,$action,$filters)->run(); |
| #13 |
+
–
/data/webdev/master/framework/web/CController.php(265): CController->runActionWithFilters(themes, array()) 260 { 261 if(($parent=$this->getModule())===null) 262 $parent=Yii::app(); 263 if($parent->beforeControllerAction($this,$action)) 264 { 265 $this->runActionWithFilters($action,$this->filters()); 266 $parent->afterControllerAction($this,$action); 267 } 268 } 269 else 270 $this->missingAction($actionID); |
| #14 |
+
–
/data/webdev/master/application/controllers/AdminController.php(202): CController->run("themes") 197 } 198 199 $this->runModuleController($action); 200 201 202 return parent::run($action); 203 } 204 205 /** 206 * Starting with LS4, 3rd party developper can extends any of the LimeSurve controllers. 207 * |
| #15 |
+
–
/data/webdev/master/framework/web/CWebApplication.php(282): AdminController->run("themes") 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
| #16 |
+
–
/data/webdev/master/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/themes/sa/upload") 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
| #17 |
+
–
/data/webdev/master/framework/base/CApplication.php(185): CWebApplication->processRequest() 180 public function run() 181 { 182 if($this->hasEventHandler('onBeginRequest')) 183 $this->onBeginRequest(new CEvent($this)); 184 register_shutdown_function(array($this,'end'),0,false); 185 $this->processRequest(); 186 if($this->hasEventHandler('onEndRequest')) 187 $this->onEndRequest(new CEvent($this)); 188 } 189 190 /** |
| #18 |
+
–
/data/webdev/master/index.php(192): CApplication->run() 187 require_once APPPATH . 'core/LSYii_Application' . EXT; 188 189 $config = require_once(APPPATH . 'config/internal' . EXT); 190 191 Yii::$enableIncludePath = false; 192 Yii::createApplication('LSYii_Application', $config)->run(); 193 194 /* End of file index.php */ 195 /* Location: ./index.php */ |
| 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 |
|