Skip to content

Commit

Permalink
Dev: Check so that template is an object
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jan 15, 2018
1 parent 358d28d commit b7ef20f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/models/Template.php
Expand Up @@ -156,7 +156,7 @@ public static function templateNameFilter($sTemplateName)
/* Validate if template is OK in user dir, DIRECTORY_SEPARATOR not needed "/" is OK */
$oTemplate = self::model()->findByPk($sTemplateName);

if ($oTemplate->checkTemplate() && (self::checkTemplateXML($oTemplate->folder))) {
if (is_object($oTemplate) && $oTemplate->checkTemplate() && (self::checkTemplateXML($oTemplate->folder))) {
self::$aNamesFiltered[$sTemplateName] = $sTemplateName;
return self::$aNamesFiltered[$sTemplateName];
}
Expand Down

0 comments on commit b7ef20f

Please sign in to comment.