From aa178f9e253e762e156c1206d55f4b37daf43407 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 04d03b6e6f..856d09ad4e 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; + } } }