-
Notifications
You must be signed in to change notification settings - Fork 183
Closed
Description
When rendering templates, variables from the rendering process leak into the template. This can be checked via
<?= $this->e(var_export(get_defined_vars(), true)) ?>
The results looks like this when no custom variables are specified:
array (
'path' => '/…/example.php',
'level' => 1,
)
This issue can be prevented by storing these values in the object that is rendering templates.
plates/src/Template/Template.php
Lines 164 to 168 in 94122ed
$path = ($this->engine->getResolveTemplatePath())($this->name); | |
try { | |
$level = ob_get_level(); | |
ob_start(); |
Metadata
Metadata
Assignees
Labels
No labels