Assign helperFunctions before doing extract
This way we avoid possiblity of rewriting it from within the context. Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
040822fe5a
commit
2674e503f2
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user