From 147c5d0631a77f3b9b88277087c9317792924711 Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Wed, 13 Oct 2010 23:22:57 +0000 Subject: [PATCH] - bugfix on output buffer handling in isCached() method --- change_log.txt | 2 +- libs/sysplugins/smarty_internal_cacheresource_file.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/change_log.txt b/change_log.txt index 76259be2..fd0d581c 100644 --- a/change_log.txt +++ b/change_log.txt @@ -3,7 +3,7 @@ - bugfix use caching properties of template instead of smarty object when compiling child {block} - bugfix {*block}...{/block*} did throw an exception in template inheritance - bugfix on template inheritance using nested eval or string resource in {extends} tags - +- bugfix on output buffer handling in isCached() method ===== RC4 ===== diff --git a/libs/sysplugins/smarty_internal_cacheresource_file.php b/libs/sysplugins/smarty_internal_cacheresource_file.php index 3ce4e8fc..c2f9a726 100644 --- a/libs/sysplugins/smarty_internal_cacheresource_file.php +++ b/libs/sysplugins/smarty_internal_cacheresource_file.php @@ -76,11 +76,12 @@ class Smarty_Internal_CacheResource_File { */ public function getCachedContents($_template, $no_render = false) { - ob_start(); + if (!$no_render) { + ob_start(); + } $_smarty_tpl = $_template; include $_template->getCachedFilepath(); if ($no_render) { - ob_clean(); return null; } else { return ob_get_clean();