Closed
Description
Using Codeigniter 4.0.3
We were seeing a blank page after uploading CodeIgniter to our linux server. After days of troubleshooting, I figured this was the problem below in Events.php. Disabled it from line 25 and the page loaded. Can you please fix this. Codeigniter 3 was known to just work out of the box. Having an IF statement here that works only on production means that devs wouldn't see this during testing.
Events::on('pre_system', function () {
if (ENVIRONMENT !== 'testing')
{
while (\ob_get_level() > 0)
{
\ob_end_flush();
}
\ob_start(function ($buffer) {
return $buffer;
});
}
Activity