Skip to content

Commit

Permalink
Merge pull request #1595 from samsonasik/handle-fatal-error-via-pre-s…
Browse files Browse the repository at this point in the history
…ystem

Retry handle fatal error via pre_system
  • Loading branch information
jim-parry authored Dec 10, 2018
2 parents b6bc2fe + 2593344 commit 9ca2e65
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions application/Config/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');

Events::on('pre_system', function () {
if (ENVIRONMENT !== 'testing')
{
\ob_start(function ($buffer) {
return $buffer;
});
}
Services::toolbar()->respond();
});
}

0 comments on commit 9ca2e65

Please sign in to comment.