Prevent wp_debug from polluting ajax within plugin (WordPress Development Stack Exchange)

I've ran into an issue here where wp_debug notices foul up my ajax response. The codex suggests using ob_clean just before returning or echoing: To parse AJAX, WordPress must be reloaded throug…

If you have php notices turned on, bad things happen.