Closed raffaelj closed 1 year ago
Sorry, I thought, this was obvious. This is to prevent printing output above the error page, which leads at least to invalid html and in the worst case to unreadable error output because of broken html tags, css mismatches or javascript overlays.
It should be enabled regardless of the debug state.
addons/test/bootstrap.php
:
<?php
$this->on('app.admin.request', function() {
$this->bind('/test', function() {
return $this->render('test:views/index.php');
});
});
addons/test/views/index.php
:
<p>output is rendered above error page</p>
<?=1/0?>
Output of error page:
<p>output is rendered above error page</p>
<html class="app-page-500-debug">
...
</html>
👍
Can you provide some context here? And should this only enabled when
debug
is false?