From 13b37a5255cd0586c32b66cfda01b6014f09dcba Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 23 Apr 2021 10:54:45 +0200 Subject: 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(-) (limited to 'lib/private/Template') diff --git a/lib/private/Template/Base.php b/lib/private/Template/Base.php index c95958ceea1..65d0ad469ff 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; + } } } -- cgit v1.2.3