LStemplate : fixed template missing warning caused by Smarty3 peculiarities
authorBenjamin Renard <brenard@easter-eggs.com>
Tue, 25 Jun 2013 09:34:42 +0000 (11:34 +0200)
committerBenjamin Renard <brenard@easter-eggs.com>
Tue, 25 Jun 2013 09:34:42 +0000 (11:34 +0200)
public_html/includes/class/class.LStemplate.php

index 984577c..2bedd3c 100644 (file)
@@ -195,6 +195,11 @@ class LStemplate {
   public static function getTemplateSource($template) {
     $tpl_path=self :: getTemplatePath($template);
     if (!is_readable($tpl_path)) {
+      if (self :: $_smarty_version > 2) {
+        // No error return with Smarty3 and highter because it's call
+        // template name in lower first systematically
+        return '';
+      }
       $tpl_path=self :: getTemplatePath('empty.tpl');
       LSerror::addErrorCode('LStemplate_01',$template);
     }