]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not allow to overwrite some variables 26788/head
authorJoas Schilling <coding@schilljs.com>
Fri, 23 Apr 2021 08:54:45 +0000 (10:54 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 27 Apr 2021 13:39:53 +0000 (13:39 +0000)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Template/Base.php

index 04d03b6e6f5a057ab06273571650038953e8b7a1..856d09ad4e830ff18e3ae681264418345b39b08c 100644 (file)
@@ -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;
+                               }
                        }
                }