mirror of
https://github.com/friendica/friendica
synced 2024-11-10 03:02:54 +00:00
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
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue