mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 16:05:00 +02:00
[ticket/13717] Fix tests
PHPBB3-13717
This commit is contained in:
parent
52b3d54805
commit
e91b1fa464
@ -205,8 +205,23 @@ class environment extends \Twig_Environment
|
||||
*/
|
||||
public function display($name, array $context = [])
|
||||
{
|
||||
$level = ob_get_level();
|
||||
ob_start();
|
||||
|
||||
try
|
||||
{
|
||||
parent::display($name, $context);
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
while (ob_get_level() > $level)
|
||||
{
|
||||
ob_end_clean();
|
||||
}
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
$output = ob_get_clean();
|
||||
|
||||
echo $this->inject_assets($output);
|
||||
|
Loading…
x
Reference in New Issue
Block a user