From 498ac1c6f536076c400015dd27c289199d4e460b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 23 Apr 2021 10:54:45 +0200 Subject: [PATCH] Do not allow to overwrite some variables Signed-off-by: Joas Schilling --- lib/private/Template/Base.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/private/Template/Base.php b/lib/private/Template/Base.php index 04d03b6e6f5..856d09ad4e8 100644 --- a/lib/private/Template/Base.php +++ b/lib/private/Template/Base.php @@ -168,7 +168,9 @@ class Base { if (!is_null($additionalParams)) { $_ = array_merge($additionalParams, $this->vars); foreach ($_ as $var => $value) { - ${$var} = $value; + if (!isset(${$var})) { + ${$var} = $value; + } } } -- 2.39.5