PHP notice

Trying to get property of non-object

/var/www/hrm.wiwi.uni-kl.de/application/models/TemplateConfiguration.php(73)

61         // If it's called for survey taking, a survey id will be provided
62         if ($sTemplateName == '' && $iSurveyId == '')
63         {
64             throw new TemplateException("Template needs either template name or survey id");
65         }
66 
67         $this->sTemplateName = $sTemplateName;
68         $this->iSurveyId     = (int) $iSurveyId;
69 
70         if ($sTemplateName=='')
71         {
72             $this->oSurvey       = Survey::model()->findByPk($iSurveyId);
73             $this->sTemplateName = $this->oSurvey->template;
74         }
75 
76         // We check if  it's a CORE template
77         $this->isStandard = $this->setIsStandard();
78 
79         // If the template is standard, its root is based on standardtemplaterootdir, else, it's a user template, its root is based on usertemplaterootdir
80         $this->path = ($this->isStandard)?Yii::app()->getConfig("standardtemplaterootdir").DIRECTORY_SEPARATOR.$this->sTemplateName:Yii::app()->getConfig("usertemplaterootdir").DIRECTORY_SEPARATOR.$this->sTemplateName;
81 
82         // If the template directory doesn't exist, it can be that:
83         // - user deleted a custom theme
84         // In any case, we just set Default as the template to use
85         if (!is_dir($this->path))

Stack Trace

#0
+
 /var/www/hrm.wiwi.uni-kl.de/application/models/Template.php(143): TemplateConfiguration->setTemplateConfiguration("", "654975")
138      * @return StdClass
139      */
140     public static function getTemplateConfiguration($sTemplateName='', $iSurveyId='')
141     {
142         $oTemplate = new TemplateConfiguration;
143         $oTemplate->setTemplateConfiguration($sTemplateName, $iSurveyId);
144         return $oTemplate;
145     }
146 
147     /**
148      * Return the list of ALL files present in the file directory
#1
+
 /var/www/hrm.wiwi.uni-kl.de/application/models/Template.php(304): Template::getTemplateConfiguration("", "654975")
299      */
300     public static function getInstance($sTemplateName='', $iSurveyId='')
301     {
302         if (empty(self::$instance))
303         {
304             self::$instance = self::getTemplateConfiguration($sTemplateName, $iSurveyId);
305         }
306         return self::$instance;
307     }
308 
309     /**
#2
+
 /var/www/hrm.wiwi.uni-kl.de/application/controllers/survey/index.php(39): Template::getInstance("", "654975")
34 
35         // Template configuration
36         $param = $this->_getParameters(func_get_args(), $_POST);
37         $surveyid = $param['sid'];
38 
39         $oTemplate = Template::model()->getInstance('', $surveyid);
40         $this->oTemplate = $oTemplate;
41         App()->clientScript->registerScript('sLSJavascriptVar',$sLSJavascriptVar,CClientScript::POS_HEAD);
42         App()->clientScript->registerScript('setJsVar',"setJsVar();",CClientScript::POS_BEGIN);// Ensure all js var is set before rendering the page (User can click before $.ready)
43 
44         foreach($oTemplate->packages as $package)
2024-03-28 17:46:39 Apache/2.2.22 (Debian) Yii Framework/1.1.17