From 6d90cd3fd7bb89afbfa61b7eafa9df9102c09ea9 Mon Sep 17 00:00:00 2001 From: rodneyrehm Date: Mon, 6 Feb 2012 20:18:47 +0000 Subject: [PATCH] bugfix fetch('extends:foo.tpl') always yielded $source->exists == true (Forum Topic 20980) --- change_log.txt | 1 + libs/sysplugins/smarty_internal_resource_extends.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 6331db4a..b016c31d 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ ===== trunk ===== 06.02.2012 - improvement stream_resolve_include_path() added to Smarty_Internal_Get_Include_Path (Forum Topic 20980) +- bugfix fetch('extends:foo.tpl') always yielded $source->exists == true (Forum Topic 20980) 30.01.2012 - bugfix Smarty_Security internal $_resource_dir cache wasn't properly propagated diff --git a/libs/sysplugins/smarty_internal_resource_extends.php b/libs/sysplugins/smarty_internal_resource_extends.php index 9400c00f..9481d992 100644 --- a/libs/sysplugins/smarty_internal_resource_extends.php +++ b/libs/sysplugins/smarty_internal_resource_extends.php @@ -45,7 +45,7 @@ class Smarty_Internal_Resource_Extends extends Smarty_Resource { $sources[$s->uid] = $s; $uid .= $s->filepath; if ($_template && $_template->smarty->compile_check) { - $exists == $exists && $s->exists; + $exists = $exists && $s->exists; } } $source->components = $sources; @@ -68,7 +68,7 @@ class Smarty_Internal_Resource_Extends extends Smarty_Resource { { $source->exists = true; foreach ($source->components as $s) { - $source->exists == $source->exists && $s->exists; + $source->exists = $source->exists && $s->exists; } $source->timestamp = $s->timestamp; }