Additional Information | PHP warning
Invalid argument supplied for foreach()
D:\dev\lsgit\application\models\TemplateConfiguration.php(629)
617 $this->oOptions = array();
618 if (!empty($this->options)){
619 $this->oOptions = json_decode($this->options);
620 }
621
622 $this->setOptionInheritance();
623 }
624
625 protected function setOptionInheritance()
626 {
627 $oOptions = $this->oOptions;
628
629 foreach($oOptions as $sKey => $sOption){
630 $oOptions->$sKey = $this->getOptionKey($sKey);
631 }
632 }
633
634 protected function getOptionKey($key){
635 $aOptions = (array) json_decode($this->options);
636 $value = $aOptions[$key];
637 if($value === 'inherit'){
638 return $this->getParentConfiguration()->getOptionKey($key);
639 }
640 return $value;
641 }
Stack Trace
#0
– D:\dev\lsgit\application\models\TemplateConfiguration.php(622): TemplateConfiguration->setOptionInheritance()
617 $this->oOptions = array();
618 if (!empty($this->options)){
619 $this->oOptions = json_decode($this->options);
620 }
621
622 $this->setOptionInheritance();
623 }
624
625 protected function setOptionInheritance()
626 {
627 $oOptions = $this->oOptions;
#1
– D:\dev\lsgit\application\models\TemplateConfiguration.php(587): TemplateConfiguration->setOptions()
582 $this->apiVersion = (!empty($this->template->api_version))? $this->template->api_version : $this->oMotherTemplate->apiVersion;
583 $this->viewPath = (!empty($this->template->view_folder)) ? $this->path.DIRECTORY_SEPARATOR.$this->template->view_folder.DIRECTORY_SEPARATOR : $this->path.DIRECTORY_SEPARATOR.$this->oMotherTemplate->view_folder.DIRECTORY_SEPARATOR;
584 $this->filesPath = (!empty($this->template->files_folder)) ? $this->path.DIRECTORY_SEPARATOR.$this->template->files_folder.DIRECTORY_SEPARATOR : $this->path.DIRECTORY_SEPARATOR.$this->oMotherTemplate->file_folder.DIRECTORY_SEPARATOR;
585
586 // Options are optional
587 $this->setOptions();
588
589 // Not mandatory (use package dependances)
590 $this->setCssFramework();
591 $this->packages = $this->getDependsPackages($this);
592 if (!empty($this->packages_to_load)){
#2
– D:\dev\lsgit\application\models\TemplateConfiguration.php(370): TemplateConfiguration->setThisTemplate()
365 public function prepareTemplateRendering($sTemplateName='', $iSurveyId='', $bUseMagicInherit=true)
366 {
367 $this->bUseMagicInherit = $bUseMagicInherit;
368 $this->setBasics($sTemplateName, $iSurveyId);
369 $this->setMotherTemplates(); // Recursive mother templates configuration
370 $this->setThisTemplate(); // Set the main config values of this template
371 $this->createTemplatePackage($this); // Create an asset package ready to be loaded
372 return $this;
373 }
374
375 public function setBasics($sTemplateName='', $iSurveyId='')
#3
– D:\dev\lsgit\application\models\Template.php(412): TemplateConfiguration->prepareTemplateRendering("", "674294")
407 }
408
409 if (empty(self::$instance)) {
410 // getTemplateConfiguration($sTemplateName=null, $iSurveyId=null, $iSurveyGroupId=null, $bForceXML=false)
411 self::$instance = $toto = self::getTemplateConfiguration($sTemplateName, $iSurveyId, $iSurveyGroupId, $bForceXML);
412 self::$instance->prepareTemplateRendering($sTemplateName, $iSurveyId);
413 }
414
415
416 return self::$instance;
417 }
#4
– D:\dev\lsgit\application\controllers\survey\index.php(281): Template::getInstance("", "674294")
276 unset($token);
277 unset($clienttoken);
278 }
279
280 //SET THE TEMPLATE DIRECTORY
281 $oTemplate = Template::model()->getInstance('', $surveyid);
282 $timeadjust = Yii::app()->getConfig("timeadjust");
283
284 //MAKE SURE SURVEY HASN'T EXPIRED
285 if ($thissurvey['expiry']!='' and dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", $timeadjust)>$thissurvey['expiry'] && $thissurvey['active']!='N' && !$previewmode){
286 $aErrors=array(gT('Error'));
#5
– D:\dev\lsgit\application\controllers\survey\index.php(21): index->action()
16 public $oTemplate;
17
18 public function run()
19 {
20 useFirebug();
21 $this->action();
22 }
23
24 function action()
25 {
26 global $surveyid;
#6
– D:\dev\lsgit\framework\web\actions\CAction.php(76): index->run()
71 {
72 $method=new ReflectionMethod($this, 'run');
73 if($method->getNumberOfParameters()>0)
74 return $this->runWithParamsInternal($this, $method, $params);
75
76 $this->run();
77 return true;
78 }
79
80 /*
81 Executes a method of an object with the supplied named parameters.
#7
– D:\dev\lsgit\framework\web\CController.php(308): CAction->runWithParams(array("lang" => "en", "sid" => "674294"))
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;
#8
– D:\dev\lsgit\framework\web\CController.php(286): CController->runAction(index)
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();
#9
– D:\dev\lsgit\framework\web\CController.php(265): CController->runActionWithFilters(index, 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);
#10
– D:\dev\lsgit\framework\web\CWebApplication.php(282): CController->run("index")
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)));
#11
– D:\dev\lsgit\framework\web\CWebApplication.php(141): CWebApplication->runController("survey/index/sid/674294")
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.
#12
– D:\dev\lsgit\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 /
#13
– D:\dev\lsgit\index.php(195): CApplication->run()
190 require_once APPPATH . 'core/LSYii_Application' . EXT;
191
192 $config = require_once(APPPATH . 'config/internal' . EXT);
193
194 Yii::$enableIncludePath = false;
195 Yii::createApplication('LSYii_Application', $config)->run();
196
197 / End of file index.php /
198 / Location: ./index.php /
2017-10-15 10:14:41 Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.5.30 Yii Framework/1.1.18 |
---|