End output buffering even if buffers are empty.

Closes #6659
This commit is contained in:
Mike Jolley 2014-11-12 16:15:47 +00:00
parent 18ebded7c5
commit a1c04670bc
1 changed files with 6 additions and 8 deletions

View File

@ -359,15 +359,13 @@ class WC_Download_Handler {
* @access private * @access private
*/ */
private static function clean_buffers() { private static function clean_buffers() {
if ( ob_get_length() ) { if ( ob_get_level() ) {
if ( ob_get_level() ) { $levels = ob_get_level();
$levels = ob_get_level(); for ( $i = 0; $i < $levels; $i++ ) {
for ( $i = 0; $i < $levels; $i++ ) { @ob_end_clean();
ob_end_clean();
}
} else {
ob_end_clean();
} }
} else {
@ob_end_clean();
} }
} }