Unbreak wfResetOutputBuffers
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 21 Aug 2015 15:48:03 +0000 (11:48 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 21 Aug 2015 16:23:32 +0000 (12:23 -0400)
commit8c76a6f0ff0a25145234127b71c2c2124a74d7f0
treed03b80373165a788f281aa7f65ac986700801a51
parenta2f75a52efe316d5fea1b5faf9cb094638b6adaf
Unbreak wfResetOutputBuffers

Sometime between 5.3 and 5.6, PHP changed from considering the default
output buffer (ob_start() or ob_start( null )) as "user" to considering
it as "internal", which prevents wfResetOutputBuffers() from removing
any buffers.

What we really should do here is test directly for whether the buffer
can be deleted, using the 'del' flag in PHP 5.3 or 'flags' in PHP 5.4+.
As for HHVM, we'll need to continue falling back to testing 'type' for
now thanks to https://github.com/facebook/hhvm/issues/5563.

Bug: T109842
Change-Id: If0163257a8fb471fd594a3754a20c65274f84a4c
includes/GlobalFunctions.php