From 2674e503f2761cdee895b8f0e28841e67faefbc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 20 Jun 2016 12:07:13 +0200 Subject: [PATCH] Assign helperFunctions before doing extract MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way we avoid possiblity of rewriting it from within the context. Signed-off-by: Michal Čihař --- libraries/Template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Template.php b/libraries/Template.php index 73d3a400f5..6f2faa0e6b 100644 --- a/libraries/Template.php +++ b/libraries/Template.php @@ -143,11 +143,11 @@ class Template $template = static::BASE_PATH . $this->name . '.phtml'; try { $this->set($data); - extract($this->data); $this->helperFunctions = array_merge( $this->helperFunctions, $helperFunctions ); + extract($this->data); ob_start(); if (file_exists($template)) { include $template;