Skip to content

Commit 5d895e0

Browse files
committed
fix: notice in error handler
1 parent c9bd4af commit 5d895e0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Classes/ExceptionMonitorFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ public static function getExceptionMonitor(): ExceptionMonitorObj
3535
});
3636

3737
$publicMessageHandler = new CallbackHandler(function (Throwable $exception) {
38-
ob_end_clean();
38+
if (ob_get_length() > 0 || ob_get_level() > 0) {
39+
ob_end_clean();
40+
}
3941
header("HTTP/1.0 500 Internal Server Error");
4042
echo self::createMessage();
4143
die();

0 commit comments

Comments
 (0)