Skip to content

Commit 55bf936

Browse files
committed
fix(view): clean output buffer before throwing view exception
1 parent b41cd98 commit 55bf936

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/view/src/Renderers/TempestViewRenderer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ private function renderCompiled(View $_view, string $_path): string
117117
try {
118118
include $_path;
119119
} catch (Throwable $throwable) {
120+
ob_end_clean(); // clean buffer before rendering exception
121+
120122
throw new ViewCompilationFailed(
121123
path: $_path,
122124
content: Filesystem\read_file($_path),

0 commit comments

Comments
 (0)