From: Gustavo André dos Santos Lopes Date: Mon, 15 Nov 2010 18:22:52 +0000 (+0000) Subject: - Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the X-Git-Tag: php-5.3.4RC1~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1045aa2a7c8497ff9f74a1078f44e675c558094a;p=php - Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the stream). --- diff --git a/NEWS b/NEWS index 389f26c055..e89b7b0a07 100644 --- a/NEWS +++ b/NEWS @@ -122,6 +122,8 @@ mssql_connect). (Felipe) - Fixed bug #52827 (cURL leaks handle and causes assertion error (CURLOPT_STDERR)). (Gustavo) +- Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the + stream). (Gustavo) - Fixed bug #52786 (PHP should reset section to [PHP] after ini sections). (Fedora at famillecollet dot com) - Fixed bug #52784 (Race condition when handling many concurrent signals). diff --git a/ext/standard/tests/file/bug52820.phpt b/ext/standard/tests/file/bug52820.phpt new file mode 100644 index 0000000000..70ac9e02b9 --- /dev/null +++ b/ext/standard/tests/file/bug52820.phpt @@ -0,0 +1,98 @@ +--TEST-- +Bug #52820 (writes to fopencookie FILE* not commited when seeking the stream) +--SKIPIF-- +fclose_stdiocast == PHP_STREAM_FCLOSE_FOPENCOOKIE) { + /* flush to commit data written to the fopencookie FILE* */ + fflush(stream->stdiocast); + } + /* handle the case where we are in the buffer */ if ((stream->flags & PHP_STREAM_FLAG_NO_BUFFER) == 0) { switch(whence) {