]> granicus.if.org Git - php/commitdiff
- Fixed bug #50657
authorPierre Joye <pajoye@php.net>
Fri, 5 Feb 2010 00:39:31 +0000 (00:39 +0000)
committerPierre Joye <pajoye@php.net>
Fri, 5 Feb 2010 00:39:31 +0000 (00:39 +0000)
main/streams/streams.c

index 65b1ce608747fb199efeb6edd267da2b00575d5c..ce561a6175722af17d6f6de87e498cd81c653509 100755 (executable)
@@ -1396,7 +1396,7 @@ PHPAPI size_t _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, s
        /* 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;