diff --git a/application/Config/Events.php b/application/Config/Events.php index 8b2fcd4a4e89..97c732ab30a6 100644 --- a/application/Config/Events.php +++ b/application/Config/Events.php @@ -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(); }); }