diff options
author | emkael <emkael@tlen.pl> | 2018-10-18 02:40:38 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-10-18 02:40:38 +0200 |
commit | eab8a101e7a3fcbb41e01a574985e06c5a3775de (patch) | |
tree | 60f201da5984b0c3638d10da02bba42b61aa3177 /lib/smarty3/sysplugins/smarty_internal_resource_extends.php | |
parent | 7f38be342c1495aeca418286c15c25c18ac9e142 (diff) |
Updating Smarty
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_resource_extends.php')
-rw-r--r-- | lib/smarty3/sysplugins/smarty_internal_resource_extends.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/smarty3/sysplugins/smarty_internal_resource_extends.php b/lib/smarty3/sysplugins/smarty_internal_resource_extends.php index 4a712e5..8094693 100644 --- a/lib/smarty3/sysplugins/smarty_internal_resource_extends.php +++ b/lib/smarty3/sysplugins/smarty_internal_resource_extends.php @@ -37,11 +37,12 @@ class Smarty_Internal_Resource_Extends extends Smarty_Resource $uid = ''; $sources = array(); $components = explode('|', $source->name); + $smarty = &$source->smarty; $exists = true; foreach ($components as $component) { /* @var \Smarty_Template_Source $_s */ - $_s = Smarty_Template_Source::load(null, $source->smarty, $component); - if ($_s->type == 'php') { + $_s = Smarty_Template_Source::load(null, $smarty, $component); + if ($_s->type === 'php') { throw new SmartyException("Resource type {$_s->type} cannot be used with the extends resource type"); } $sources[ $_s->uid ] = $_s; @@ -85,11 +86,9 @@ class Smarty_Internal_Resource_Extends extends Smarty_Resource public function getContent(Smarty_Template_Source $source) { if (!$source->exists) { - throw new SmartyException("Unable to read template {$source->type} '{$source->name}'"); + throw new SmartyException("Unable to load template '{$source->type}:{$source->name}'"); } - $_components = array_reverse($source->components); - $_content = ''; /* @var \Smarty_Template_Source $_s */ foreach ($_components as $_s) { @@ -117,6 +116,9 @@ class Smarty_Internal_Resource_Extends extends Smarty_Resource * * @return bool */ + /** + * @return bool + */ public function checkTimestamps() { return false; |