handle false returns from template
authorAlan Knowles <alan@roojs.com>
Fri, 26 Feb 2021 04:08:36 +0000 (12:08 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 26 Feb 2021 04:08:36 +0000 (12:08 +0800)
HTML/Template/Flexy.php

index 6cac125..829e0eb 100644 (file)
@@ -455,7 +455,7 @@ class HTML_Template_Flexy
             }
             if (method_exists($tr,'lastUpdated') ) { // new way..
                 $last_update = $tr->lastUpdated($this);
-                $recompile = strtotime($last_update) > filemtime( $this->compiledTemplate );
+                $recompile = $last_update !== false ? strtotime($last_update) > filemtime( $this->compiledTemplate ) : false;
             } else if (method_exists($tr,'translateChanged')) { // old code...
                 $recompile = $tr->translateChanged($this);