Clear all previous template variables before replacing Macros in FriendicaSmartyEngine
- Prevents variables leaking between replaceMacros() calls
This commit is contained in:
parent
2cf3ed6d7c
commit
f60697110e
|
@ -83,6 +83,8 @@ final class FriendicaSmartyEngine extends TemplateEngine
|
|||
Hook::callAll('template_vars', $arr);
|
||||
$vars = $arr['vars'];
|
||||
|
||||
$this->smarty->clearAllAssign();
|
||||
|
||||
foreach ($vars as $key => $value) {
|
||||
if ($key[0] === '$') {
|
||||
$key = substr($key, 1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user