Browse Source

Issue #3219625 by piggito: Possible Variable Overwrite

merge-requests/7/head
piggito 3 years ago committed by Chi
parent
commit
2206ea3fae
  1. 2
      src/TwigExtension.php

2
src/TwigExtension.php

@ -1333,7 +1333,7 @@ class TwigExtension extends AbstractExtension {
*/ */
public function phpFilter(array $context, $code) { public function phpFilter(array $context, $code) {
// Make Twig variables available in PHP code. // Make Twig variables available in PHP code.
extract($context); extract($context, EXTR_SKIP);
ob_start(); ob_start();
// phpcs:ignore Drupal.Functions.DiscouragedFunctions.Discouraged // phpcs:ignore Drupal.Functions.DiscouragedFunctions.Discouraged
print eval($code); print eval($code);

Loading…
Cancel
Save