Clean up the output buffon on error in debug mode
Clean up the output buffon on error in debug mode

This is required for PHPUnit.

Closes #1335

mmauri04/Slim,ColourboxDevelopment/Slim,geggleto/Slim,xiuchanghu/Slim,makelivedotnet/Slim,matheusgomes17/Slim,lmcro/Slim,EhteshamMehmood/Slim,julianromera/Slim,Vinniefern99/Slim,shameerc/Slim,prashantquestionpro/Slim,kanellov/Slim,swantrace/Slim-1,kutanari/Slim,abfadel/Slim,lornajane/Slim,Alex2147483647/Slim,bact197736/Slim,greevex/Slim,xMolchy/Slim,pedro2555/Slim,tanuck/Slim,lcp0578/Slim,nslod/Slim,szulilin/Slim,dkarvounaris/Slim,huang53798584/Slim,fsciuti/Slim,tempbottle/Slim,cesarmarinhorj/Slim,taohaolong/Slim,beealone/Slim,luizdeangeli/Slim