Commit: 731a5c51040042a0f344752fee1117701efa3cfd Author: Remi Collet <r...@php.net> Tue, 2 Apr 2013 16:31:36 +0200 Parents: 8e8a75444cbb6bb108e212d48513343fe21c9255 Branches: PHP-5.4 PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=731a5c51040042a0f344752fee1117701efa3cfd Log: keep previous test to avoid any behavior change Changed paths: M main/streams/streams.c Diff: diff --git a/main/streams/streams.c b/main/streams/streams.c index 7bc4c9d..cb80e9a 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1535,8 +1535,10 @@ PHPAPI int _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, size *len = didwrite; - /* read bytes match written */ - if (mapped == didwrite) { + /* we've got at least 1 byte to read + * less than 1 is an error + * AND read bytes match written */ + if (mapped > 0 && mapped == didwrite) { return SUCCESS; } return FAILURE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php