diff --git a/system/src/Grav/Common/Grav.php b/system/src/Grav/Common/Grav.php index 33e5a2a28..7ba3ad4cf 100644 --- a/system/src/Grav/Common/Grav.php +++ b/system/src/Grav/Common/Grav.php @@ -167,12 +167,6 @@ class Grav extends Container public function process() { - // Use output buffering to prevent headers from being sent too early. - ob_start(); - if ($this['config']->get('system.cache.gzip')) { - ob_start('ob_gzhandler'); - } - /** @var Debugger $debugger */ $debugger = $this['debugger']; @@ -185,6 +179,12 @@ class Grav extends Container $this['config']->debug(); $debugger->stopTimer('_config'); + // Use output buffering to prevent headers from being sent too early. + ob_start(); + if ($this['config']->get('system.cache.gzip')) { + ob_start('ob_gzhandler'); + } + // Initialize the timezone if ($this['config']->get('system.timezone')) { date_default_timezone_set($this['config']->get('system.timezone'));