Skip to content

Commit 7e7f726

Browse files
committed
Clean previous content only if needed
1 parent 3936d54 commit 7e7f726

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

featherbb/routes.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@
220220

221221
// Display a simple error page that does not require heavy user-specific methods like permissions
222222
if (method_exists($e, 'isSimpleError') && $e->isSimpleError()) {
223-
ob_end_clean();
223+
if (ob_get_contents()) {
224+
ob_end_clean();
225+
}
224226

225227
// ob_start to avoid an extra "1" returned by PHP with a successful inclusion
226228
ob_start();

0 commit comments

Comments
 (0)