Summary: See D589. Some environments configure output buffering with a prepend script. This is rather silly, but we can at least recover from it.
Test Plan: Started multiple output buffers with ob_start() and then used phutil_console_confirm() to create a prompt. Verified that 'arc' was broken under output buffering prior to the patch, but now works correctly.
Reviewed By: dreuss
}
phutil_load_library(dirname(__FILE__).'/../src/');
+
+// There may be some kind of auto-prepend script configured which starts an
+// output buffer. Discard any such output buffers.
+while (ob_get_level() > 0) {
+ ob_end_clean();
+}