diff --git a/NEWS b/NEWS index 5d3cf392..29a9f21a 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - fixed code generation of non-cacheable blocks to play well with php's + "Alternative syntax for control structures" (kihara, messju) - fix handling of multiple identical inserts in one display()-call (messju) - replace {} string access with equivalent substr() to avoid E_STRICT warnings in PHP 5.1 (boots) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 25d03b28..9dc6f277 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -2216,7 +2216,7 @@ class Smarty_Compiler extends Smarty { if (!isset($this->_cache_serial)) $this->_cache_serial = md5(uniqid('Smarty')); $_ret = 'if ($this->caching && !$this->_cache_including) { echo \'{nocache:' . $this->_cache_serial . '#' . $this->_nocache_count - . '}\';}'; + . '}\'; };'; return $_ret; } @@ -2233,7 +2233,7 @@ class Smarty_Compiler extends Smarty { || --$this->_cacheable_state>0) return ''; return 'if ($this->caching && !$this->_cache_including) { echo \'{/nocache:' . $this->_cache_serial . '#' . ($this->_nocache_count++) - . '}\';}'; + . '}\'; };'; }