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/controllers/PrintanswersController.php(150): Template::getTemplatePath("default")
145             $aData['aSurveyInfo']['include_content'] = 'printanswers';
146             Yii::app()->twigRenderer->renderTemplateFromFile('layout_printanswers.twig', $aData, false);
147 
148         } else if ($sExportType == 'pdf') {
149             // Get images for TCPDF from template directory
150             define('K_PATH_IMAGES', Template::getTemplatePath($aSurveyInfo['template']).DIRECTORY_SEPARATOR);
151 
152             Yii::import('application.libraries.admin.pdf', true);
153             Yii::import('application.helpers.pdfHelper');
154             $aPdfLanguageSettings = pdfHelper::getPdfLanguageSettings(App()->language);
155 
#10
+
 /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:37:23 Apache/2.2.22 (Debian) Yii Framework/1.1.18