Every time I have an error, for example: trying to access a property of a non-object, I get this message:
ob_end_flush(): failed to send buffer of zlib output compression (0)
open: /home/admin/domains/mysite/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php
$previous = null;
$obStatus = ob_get_status(1);
while (($level = ob_get_level()) > 0 && $level !== $previous) {
$previous = $level;
if ($obStatus[$level - 1]) {
if (version_compare(PHP_VERSION, '5.4', '>=')) {
if (isset($obStatus[$level - 1]['flags']) && ($obStatus[$level - 1]['flags'] & PHP_OUTPUT_HANDLER_REMOVABLE)) {
ob_end_flush();
}
}
}
}
I tried setting in php.ini
:
zlib.output_compression = Off
zlib.output_handler =
but it does not help.
I am using Laravel 4.1
Does anyone know how to resolve this?
If your are using @secction in your view then use @stop bellow the section to stop the section area
Not sure if this helps, but I came across this question and thought I would share what fixed it for me, with the same error. It was caused by trying to set a null variable passed in via a section call. To fix it simply use a isset check.
@isset($var)
@section('header', $var)
@endisset
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With