EllisLab/CodeIgniter — pull request #2677 by doitlikejustin (2013-10-08 19:06:32+00:00)
Title: Added conditions that checks if there is a buffer to delete

If there is no buffer to delete (e.g., calling show_error() in the __construct when doing security checks) PHP throws an error (notice) that it failed to delete buffer. We can add a simple check to see if the buffer length is greater than 0, and if it is, then run ob_end_clean()