From: Joas Schilling Date: Fri, 23 Apr 2021 08:54:45 +0000 (+0200) Subject: Do not allow to overwrite some variables X-Git-Tag: v20.0.10RC1~8^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=498ac1c6f536076c400015dd27c289199d4e460b;p=nextcloud-server.git Do not allow to overwrite some variables Signed-off-by: Joas Schilling --- 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; + } } }