One of the following lines are causing the media upload to indicate a failed upload...
It is probably the second line on its own causing the issue but I've been removing both because leaving one in my application causes other issues.
To be clear on the issue I had. I uploaded an image, red box appeared indicating failure. On refresh I found the image actually uploaded. If that is not happening with you then you may have a different fault and different cause.
The error_reporting(E_ALL) also causes other plugins to fail. It may be plugins that have their own media buttons above the WYSIWYG editor or those that use Ajax. I'm thinking error reporting is happening within an Ajax process and so that has to be what is returned.
I see a lot of talk on the forums about issues with the media manager. I hope this helps someone.