ghislainf / zf2-whoops

PHP whoops error on ZF2 framework
https://github.com/filp/whoops
59 stars 10 forks source link

checking if there is buffer to clean #18

Closed jaydiablo closed 8 years ago

jaydiablo commented 8 years ago

Only executing ob_clean if there is a buffer to clean, otherwise throws a “ob_clean(): failed to delete buffer. No buffer to delete” notice, which gets trapped by whoops, informing me of the wrong error. :)

jaydiablo commented 8 years ago

I just noticed that this is nearly identical to #13. FWIW I used ob_get_length() instead of ob_get_contents() based on discussion here: http://stackoverflow.com/questions/14549110/failed-to-delete-buffer-no-buffer-to-delete