svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/standard/php_fopen_wrapper.c branches/PHP_5_3/NEWS
branches/PHP_5_3/ext/standard/php_fopen_wrapper.c trunk/ext/standard/php_fopen_wrapper.c
| From: | Jani Taskinen | Date: | Thu, 20 Aug 2009 12:40:15 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/standard/php_fopen_wrapper.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/php_fopen_wrapper.c trunk/ext/standard/php_fopen_wrapper.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-60195@lists.php.net to get a copy of this message | ||
jani Thu, 20 Aug 2009 12:40:15 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=287507
Log:
- Fixed bug #49286 (php://input (php_stream_input_read) is broken)
Bug: http://bugs.php.net/49286 (Verified) php://input
(php_stream_input_read) is broken
Changed paths:
U php/php-src/branches/PHP_5_2/NEWS
U php/php-src/branches/PHP_5_2/ext/standard/php_fopen_wrapper.c
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/ext/standard/php_fopen_wrapper.c
U php/php-src/trunk/ext/standard/php_fopen_wrapper.c
Modified: php/php-src/branches/PHP_5_2/NEWS
===================================================================
--- php/php-src/branches/PHP_5_2/NEWS 2009-08-20 12:19:49 UTC (rev 287506)
+++ php/php-src/branches/PHP_5_2/NEWS 2009-08-20 12:40:15 UTC (rev 287507)
@@ -5,6 +5,7 @@
- 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)
Modified: php/php-src/branches/PHP_5_2/ext/standard/php_fopen_wrapper.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/standard/php_fopen_wrapper.c 2009-08-20 12:19:49 UTC (rev
287506)
+++ php/php-src/branches/PHP_5_2/ext/standard/php_fopen_wrapper.c 2009-08-20 12:40:15 UTC (rev
287507)
@@ -91,13 +91,14 @@
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;
}
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2009-08-20 12:19:49 UTC (rev 287506)
+++ php/php-src/branches/PHP_5_3/NEWS 2009-08-20 12:40:15 UTC (rev 287507)
@@ -26,6 +26,7 @@
(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)
Modified: php/php-src/branches/PHP_5_3/ext/standard/php_fopen_wrapper.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/php_fopen_wrapper.c 2009-08-20 12:19:49 UTC (rev
287506)
+++ php/php-src/branches/PHP_5_3/ext/standard/php_fopen_wrapper.c 2009-08-20 12:40:15 UTC (rev
287507)
@@ -91,13 +91,14 @@
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;
}
Modified: php/php-src/trunk/ext/standard/php_fopen_wrapper.c
===================================================================
--- php/php-src/trunk/ext/standard/php_fopen_wrapper.c 2009-08-20 12:19:49 UTC (rev 287506)
+++ php/php-src/trunk/ext/standard/php_fopen_wrapper.c 2009-08-20 12:40:15 UTC (rev 287507)
@@ -91,13 +91,14 @@
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;
}