Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occasional errors with zlib.output_compression = On #704

Open
kexxt opened this issue Sep 14, 2021 · 1 comment
Open

Occasional errors with zlib.output_compression = On #704

kexxt opened this issue Sep 14, 2021 · 1 comment

Comments

@kexxt
Copy link

kexxt commented Sep 14, 2021

Hello, occasionally I experience this error when I should not be seeing any whoops-related pages.

Uncaught Whoops\Exception\ErrorException: ob_end_clean(): failed to discard buffer of zlib output compression (1)

I've identified the issue is caused by Run.php line 396:

while ($this->system->getOutputBufferLevel() > 0) {
    $this->system->endOutputBuffering();
}

I am also submitting a PR with a very simple fix

@kexxt
Copy link
Author

kexxt commented Sep 14, 2021

Specifically the problem occurs when ob_end_clean() is called while ob_get_length() is zero. By checking for a length > 0, we avoid the aforementioned error. When I tested this fix I stopped seeing the error and was able to resume debugging my own application (I was actually supposed to see a whoops page for something different.

@kexxt kexxt closed this as completed Sep 14, 2021
@denis-sokolov denis-sokolov reopened this Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants