1
0
Fork 0

Clear all previous template variables before replacing Macros in FriendicaSmartyEngine

- Prevents variables leaking between replaceMacros() calls
This commit is contained in:
Hypolite Petovan 2020-06-12 22:06:09 -04:00
parent 2cf3ed6d7c
commit f60697110e

View file

@ -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);