Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
3ace768e
Commit
3ace768e
authored
19 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- 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
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
themes/engines/phptemplate/phptemplate.engine
+6
-7
6 additions, 7 deletions
themes/engines/phptemplate/phptemplate.engine
with
6 additions
and
7 deletions
themes/engines/phptemplate/phptemplate.engine
+
6
−
7
View file @
3ace768e
...
...
@@ -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
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment