From: Hypolite Petovan Date: Sat, 13 Jun 2020 02:06:09 +0000 (-0400) Subject: Clear all previous template variables before replacing Macros in FriendicaSmartyEngine X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f60697110eaaad543fb1fb2a840abc31d871b44f;p=friendica.git Clear all previous template variables before replacing Macros in FriendicaSmartyEngine - Prevents variables leaking between replaceMacros() calls --- diff --git a/src/Render/FriendicaSmartyEngine.php b/src/Render/FriendicaSmartyEngine.php index 2c76ff0255..0f5ee21f27 100644 --- a/src/Render/FriendicaSmartyEngine.php +++ b/src/Render/FriendicaSmartyEngine.php @@ -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);