diff --git a/Views/ViewAbstract.php b/Views/ViewAbstract.php index abb9c6487..a6344f5e6 100644 --- a/Views/ViewAbstract.php +++ b/Views/ViewAbstract.php @@ -300,11 +300,10 @@ abstract class ViewAbstract implements RenderableInterface $ob = (string) \json_encode($includeData); } } catch (\Throwable $e) { - if ($this->isBuffered) { - \ob_end_clean(); - } - $ob = ''; + if ($this->isBuffered) { + $ob = \ob_get_clean(); + } } return $ob;