diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index 217fb8f8..70f22546 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -295,12 +295,12 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase $tpl->mustCompile = true; $compiler->parent_compiler->mergedSubTemplatesData[ $uid ][ $t_hash ][ 'nocache_hash' ] = $tpl->compiled->nocache_hash; - if ($compiler->template->source->type === 'file') { - $sourceInfo = $compiler->template->source->filepath; + if ($tpl->source->type === 'file') { + $sourceInfo = $tpl->source->filepath; } else { - $basename = $compiler->template->source->handler->getBasename($compiler->template->source); - $sourceInfo = $compiler->template->source->type . ':' . - ($basename ? $basename : $compiler->template->source->name); + $basename = $tpl->source->handler->getBasename($tpl->source); + $sourceInfo = $tpl->source->type . ':' . + ($basename ? $basename : $tpl->source->name); } // get compiled code $compiled_code = "