svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/main/streams/streams.c branches/PHP_5_3/NEWS branches/PHP_5_3/main/streams/streams.c
trunk/main/streams/streams.c
| From: | Ilia Alshanetsky | Date: | Wed, 06 Jan 2010 12:54:53 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/main/streams/streams.c branches/PHP_5_3/NEWS branches/PHP_5_3/main/streams/streams.c trunk/main/streams/streams.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-61483@lists.php.net to get a copy of this message | ||
iliaa Wed, 06 Jan 2010 12:54:53 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=293175
Log:
Fixed bug #50657 (copy() with an empty (zero-byte) HTTP source succeeds but returns false).
Bug: http://bugs.php.net/50657 (Analyzed) copy() with an
empty (zero-byte) HTTP source succeeds but returns false
Changed paths:
U php/php-src/branches/PHP_5_2/NEWS
U php/php-src/branches/PHP_5_2/main/streams/streams.c
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/main/streams/streams.c
U php/php-src/trunk/main/streams/streams.c
Modified: php/php-src/branches/PHP_5_2/NEWS
===================================================================
--- php/php-src/branches/PHP_5_2/NEWS 2010-01-06 11:57:15 UTC (rev 293174)
+++ php/php-src/branches/PHP_5_2/NEWS 2010-01-06 12:54:53 UTC (rev 293175)
@@ -11,6 +11,8 @@
- Fixed build of mysqli with MySQL 5.5.0-m2. (Andrey)
+- Fixed bug #50657 (copy() with an empty (zero-byte) HTTP source succeeds but
+ returns false). (Ilia)
- Fixed bug #50636 (MySQLi_Result sets values before calling constructor).
(Pierrick)
- Fixed bug #50632 (filter_input() does not return default value if the
Modified: php/php-src/branches/PHP_5_2/main/streams/streams.c
===================================================================
--- php/php-src/branches/PHP_5_2/main/streams/streams.c 2010-01-06 11:57:15 UTC (rev 293174)
+++ php/php-src/branches/PHP_5_2/main/streams/streams.c 2010-01-06 12:54:53 UTC (rev 293175)
@@ -1386,7 +1386,7 @@
/* we've got at least 1 byte to read.
* less than 1 is an error */
- if (haveread > 0) {
+ if (haveread > 0 || src->eof) {
return SUCCESS;
}
return FAILURE;
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2010-01-06 11:57:15 UTC (rev 293174)
+++ php/php-src/branches/PHP_5_3/NEWS 2010-01-06 12:54:53 UTC (rev 293175)
@@ -8,6 +8,8 @@
(Ilia)
- Added stream_resolve_include_path(). (Mikko)
+- Fixed bug #50657 (copy() with an empty (zero-byte) HTTP source succeeds
+ but returns false). (Ilia)
- Fixed bug #50636 (MySQLi_Result sets values before calling constructor).
(Pierrick)
- Fixed bug #50632 (filter_input() does not return default value if the
Modified: php/php-src/branches/PHP_5_3/main/streams/streams.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/streams/streams.c 2010-01-06 11:57:15 UTC (rev 293174)
+++ php/php-src/branches/PHP_5_3/main/streams/streams.c 2010-01-06 12:54:53 UTC (rev 293175)
@@ -1396,7 +1396,7 @@
/* we've got at least 1 byte to read.
* less than 1 is an error */
- if (haveread > 0) {
+ if (haveread > 0 || src->eof) {
return SUCCESS;
}
return FAILURE;
Modified: php/php-src/trunk/main/streams/streams.c
===================================================================
--- php/php-src/trunk/main/streams/streams.c 2010-01-06 11:57:15 UTC (rev 293174)
+++ php/php-src/trunk/main/streams/streams.c 2010-01-06 12:54:53 UTC (rev 293175)
@@ -1877,7 +1877,7 @@
/* we've got at least 1 byte to read.
* less than 1 is an error */
- if (haveread > 0) {
+ if (haveread > 0 || src->eof) {
return SUCCESS;
}
return FAILURE;