Skip to content
Snippets Groups Projects
Commit 3ace768e authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch by Rober: better fix for the extract() namespace problem in phptemplate.engine.

parent 0094e99b
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -331,13 +331,12 @@ function _phptemplate_default($hook, $variables, $file = NULL) {
}
if ($file) {
unset($variables['file']); // Make sure we don't override $file
extract($variables); // Extract the vars to local namespace
ob_start(); // Start output buffering
include($file); // Include the file
$contents = ob_get_contents(); // Get the contents of the buffer
ob_end_clean(); // End buffering and discard
return $contents; // Return the contents
extract($variables, EXTR_SKIP); // Extract the vars to local namespace
ob_start(); // Start output buffering
include($file); // Include the file
$contents = ob_get_contents(); // Get the contents of the buffer
ob_end_clean(); // End buffering and discard
return $contents; // Return the contents
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment