Skip to content

Commit 5ddf2ed

Browse files
authored
Merge pull request #152 from BeAPI/issue/80964
ensure all existing buffers are closed before streaming the product feed file
2 parents c927019 + 1121be6 commit 5ddf2ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Feed/Generator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ public function render( $no_cache = false ) {
273273
}
274274

275275
if ( is_file( $file_path ) ) {
276+
while ( ob_get_level() ) {
277+
ob_end_clean();
278+
}
279+
276280
header( 'Content-Type: application/xml; charset=utf-8' );
277281
header( 'Content-Length: ' . filesize( $file_path ) );
278282
nocache_headers();

0 commit comments

Comments
 (0)