From d4bfb366b8dfa65e356c4dc2148e27b5d67519cd Mon Sep 17 00:00:00 2001 From: bzick Date: Tue, 6 Jan 2015 23:42:54 +0300 Subject: [PATCH] Fix #128 --- src/Fenom.php | 1 - src/Fenom/Render.php | 15 +++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Fenom.php b/src/Fenom.php index 837466b..fef4523 100644 --- a/src/Fenom.php +++ b/src/Fenom.php @@ -1025,7 +1025,6 @@ class Fenom } if ($store) { $cache = $this->_getCacheName($tpl, $options); - dumpt($cache, $tpl); $tpl_tmp = tempnam($this->_compile_dir, $cache); $tpl_fp = fopen($tpl_tmp, "w"); if (!$tpl_fp) { diff --git a/src/Fenom/Render.php b/src/Fenom/Render.php index 48b260a..64fd917 100644 --- a/src/Fenom/Render.php +++ b/src/Fenom/Render.php @@ -176,14 +176,13 @@ class Render extends \ArrayObject */ public function isValid() { - if (count($this->_depends[0]) === 1) { // if no external dependencies, only self - $provider = $this->_fenom->getProvider($this->_scm); - if ($provider->getLastModified($this->_name) !== $this->_time) { - return false; - } - } else { - foreach ($this->_depends as $scm => $templates) { - $provider = $this->_fenom->getProvider($scm); + foreach ($this->_depends as $scm => $templates) { + $provider = $this->_fenom->getProvider($scm); + if(count($templates) === 1) { + if ($provider->getLastModified(key($templates)) !== $this->_time) { + return false; + } + } else { if (!$provider->verify($templates)) { return false; }