PHP notice

Trying to get property of non-object

/home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey_master/application/models/Template.php(292)

280     public static function getTemplatePath($sTemplateName = "")
281     {
282         static $aTemplatePath = array();
283         if (isset($aTemplatePath[$sTemplateName])) {
284             return $aTemplatePath[$sTemplateName];
285         }
286 
287         $oTemplate = self::model()->findByPk($sTemplateName);
288 
289         if (self::isStandardTemplate($sTemplateName)) {
290             return $aTemplatePath[$sTemplateName] = Yii::app()->getConfig("standardthemerootdir").DIRECTORY_SEPARATOR.$oTemplate->folder;
291         } else {
292             return $aTemplatePath[$sTemplateName] = Yii::app()->getConfig("userthemerootdir").DIRECTORY_SEPARATOR.$oTemplate->folder;
293         }
294     }
295 
296     /**
297      * This method construct a template object, having all the needed configuration datas.
298      * It checks if the required template is a core one or a user one.
299      * If it's a user template, it will check if it's an old 2.0x template to provide default configuration values corresponding to the old template system
300      * If it's not an old template, it will check if it has a configuration file to load its datas.
301      * If it's not the case (template probably doesn't exist), it will load the default template configuration
302      * TODO : more tests should be done, with a call to private function _is_valid_template(), testing not only if it has a config.xml, but also id this file is correct, if the files refered in css exist, etc.
303      *
304      * @param string $sTemplateName     the name of the template to load. The string come from the template selector in survey settings

Stack Trace

#0
+
 /home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey_master/application/helpers/common_helper.php(3169): Template::getTemplatePath("skeletonquest_nohead")
3164  * @param mixed $sTemplateName
3165  * @return string
3166  */
3167 function getTemplatePath($sTemplateName = '')
3168 {
3169     return Template::getTemplatePath($sTemplateName);
3170 }
3171 
3172 /**
3173  * This function returns the complete URL path to a given template name
3174  *
#1
+
 /home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey_master/application/controllers/UploaderController.php(284): getTemplatePath("skeletonquest_nohead")
279         $oEvent->set('surveyId', $surveyid);
280         App()->getPluginManager()->dispatchEvent($oEvent);
281         if (!is_null($oEvent->get('template'))) {
282             $aSurveyInfo['templatedir'] = $event->get('template');
283         }
284         $sTemplateDir = getTemplatePath($aSurveyInfo['template']);
285         $sTemplateUrl = getTemplateURL($aSurveyInfo['template'])."/";
286         App()->clientScript->registerScript('sNeededScriptVar', $sNeededScriptVar, CClientScript::POS_HEAD);
287         App()->clientScript->registerScript('sLangScriptVar', $sLangScriptVar, CClientScript::POS_HEAD);
288         $oTemplate = Template::model()->getInstance('', $surveyid);
289         Yii::app()->clientScript->registerPackage('survey-template-'.$oTemplate->sTemplateName);
#5
+
 /home/sondages.pro/htdocs/limesurvey_GIT/LimeSurvey_master/index.php(194): CApplication->run()
189 require_once APPPATH . 'core/LSYii_Application' . EXT;
190 
191 $config = require_once(APPPATH . 'config/internal' . EXT);
192 
193 Yii::$enableIncludePath = false;
194 Yii::createApplication('LSYii_Application', $config)->run();
195 
196 /* End of file index.php */
197 /* Location: ./index.php */
2018-03-16 18:38:38 Apache/2.2.22 (Debian) Yii Framework/1.1.18