diff options
author | Jani Taskinen <jani@php.net> | 2009-08-20 12:40:15 +0000 |
---|---|---|
committer | Jani Taskinen <jani@php.net> | 2009-08-20 12:40:15 +0000 |
commit | 767abb9b662de7121a45be25ef193673efacc508 (patch) | |
tree | 1a7887ff9f6808ff953c686ff56f53c4cd074ee0 | |
parent | 5e733571b3ea2e102aeb679fad0fa417f624943e (diff) | |
download | php-git-767abb9b662de7121a45be25ef193673efacc508.tar.gz |
- Fixed bug #49286 (php://input (php_stream_input_read) is broken)
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | ext/standard/php_fopen_wrapper.c | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -26,6 +26,7 @@ PHP NEWS (Ilia) - Fixed bug #49289 (bcmath module doesn't compile with phpize configure). (Jani) +- Fixed bug #49286 (php://input (php_stream_input_read) is broken). (Jani) - Fixed bug #49269 (Ternary operator fails on Iterator object when used inside foreach declaration). (Etienne, Dmitry) - Fixed bug #49236 (Missing PHP_SUBST(PDO_MYSQL_SHARED_LIBADD)). (Jani) diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 21fb97644b..4d50db76d6 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -91,13 +91,14 @@ static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count stream->eof = 1; read_bytes = 0; } + /* Increment SG(read_post_bytes) only when something was actually read. */ + SG(read_post_bytes) += read_bytes; } else { stream->eof = 1; } } *position += read_bytes; - SG(read_post_bytes) += read_bytes; return read_bytes; } |