From: jenkins-bot Date: Fri, 27 Apr 2018 02:37:30 +0000 (+0000) Subject: Merge "Fix warning "ob_end_flush(): failed to delete and flush buffer" during uploads" X-Git-Tag: 1.34.0-rc.0~5595 X-Git-Url: http://git.cyclocoop.org/%27.%28%24current%20%3E%202?a=commitdiff_plain;h=733993fa54ecd9d55e52c88ed44be343b9a8abed;hp=b6853e00097b545521e09289b714f505cf55f55d;p=lhc%2Fweb%2Fwiklou.git Merge "Fix warning "ob_end_flush(): failed to delete and flush buffer" during uploads" --- diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 28021effcf..b15f81fafe 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -1628,7 +1628,11 @@ class FileRepo { $status = $this->newGood(); $status->merge( $this->backend->streamFile( $params ) ); - ob_end_flush(); + // T186565: Close the buffer, unless it has already been closed + // in HTTPFileStreamer::resetOutputBuffers(). + if ( ob_get_status() ) { + ob_end_flush(); + } return $status; }