Created
November 3, 2022 14:51
-
-
Save omahm/fadf6491c33487ddce54c43b9eb2c3a0 to your computer and use it in GitHub Desktop.
Fixes issue: PHP Fatal error: ob_get_clean(): Cannot use output buffering in output buffering display handlers in /app/vendor/twig/twig/src/Template.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git src/TwigTweakExtension.php src/TwigTweakExtension.php | |
index d007798..072c953 100644 | |
--- src/TwigTweakExtension.php | |
+++ src/TwigTweakExtension.php | |
@@ -703,9 +703,7 @@ class TwigTweakExtension extends AbstractExtension { | |
ob_start(); | |
// phpcs:ignore Drupal.Functions.DiscouragedFunctions.Discouraged | |
print eval($code); | |
- $output = ob_get_contents(); | |
- ob_end_clean(); | |
- return $output; | |
+ return ob_get_clean(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment