Commit abad80d8 by Kamil Szot Committed by Jordi Boggiano

Actually delegate execution to new instance and return result instead just returning the instance.

parent 9d77fe2c
......@@ -316,7 +316,8 @@ class Dwoo_Core
{
// a render call came from within a template, so we need a new dwoo instance in order to avoid breaking this one
if ($this->template instanceof Dwoo_ITemplate) {
return clone $this;
$clone = clone $this;
return $clone->get($_tpl, $data, $_compiler, $_output);
}
// auto-create template if required
......
......@@ -62,7 +62,7 @@ function Dwoo_Plugin_include(Dwoo_Core $dwoo, $file, $cache_time = null, $cache_
$vars = $rest + $vars;
}
$clone = $dwoo->get(null);
$clone = clone $dwoo;
$out = $clone->get($include, $vars);
if ($assign !== null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment