Skip to content

Commit 6bb3025

Browse files
author
Paul M. Jones
authored
Use func_get_arg(0) vs $template
This makes it more-obvious to casual reviewers that $template cannot be replaced by the extract() call, and thus is not a security vulnerability.
1 parent 122ed12 commit 6bb3025

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/PhpRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,6 @@ public function fetch($template, array $data = []) {
185185
*/
186186
protected function protectedIncludeScope ($template, array $data) {
187187
extract($data);
188-
include $template;
188+
include func_get_arg(0);
189189
}
190190
}

0 commit comments

Comments
 (0)