mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-29 10:13:25 +02:00
Return to saved output buffer level on exceptions
This commit is contained in:
@@ -149,12 +149,15 @@ class Smarty_Template_Compiled
|
||||
$compileCheck = $_template->smarty->compile_check;
|
||||
$_template->smarty->compile_check = false;
|
||||
if ($_template->source->recompiled) {
|
||||
$level = ob_get_level();
|
||||
ob_start();
|
||||
try {
|
||||
ob_start();
|
||||
eval("?>" . $this->code);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
ob_get_clean();
|
||||
while (ob_get_level() > $level) {
|
||||
ob_end_clean();
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
ob_get_clean();
|
||||
|
||||
Reference in New Issue
Block a user