mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 21:31:48 +01:00
Return to saved output buffer level on exceptions
This commit is contained in:
@@ -219,13 +219,16 @@ class Smarty_Template_Source
|
||||
*/
|
||||
public function renderUncompiled(Smarty_Internal_Template $_template)
|
||||
{
|
||||
$level = ob_get_level();
|
||||
ob_start();
|
||||
try {
|
||||
ob_start();
|
||||
$this->handler->renderUncompiled($_template->source, $_template);
|
||||
return ob_get_clean();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
ob_get_clean();
|
||||
while (ob_get_level() > $level) {
|
||||
ob_end_clean();
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user