wez Wed Feb 12 20:17:45 2003 EDT Modified files: /php4/main streams.c Log: Fix for Bug #21815 (fpassthru ignored buffered data but then complained anyway) Index: php4/main/streams.c diff -u php4/main/streams.c:1.145 php4/main/streams.c:1.146 --- php4/main/streams.c:1.145 Sun Feb 9 15:43:05 2003 +++ php4/main/streams.c Wed Feb 12 20:17:45 2003 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.145 2003/02/09 20:43:05 iliaa Exp $ */ +/* $Id: streams.c,v 1.146 2003/02/13 01:17:45 wez Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -1029,6 +1029,7 @@ #ifdef HAVE_MMAP if (!php_stream_is(stream, PHP_STREAM_IS_SOCKET) && stream->filterhead == NULL + && php_stream_tell(stream) == 0 && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)&fd, 0)) { struct stat sbuf; @@ -2047,7 +2048,7 @@ * know that they should try something else */ php_error_docref(NULL TSRMLS_CC, E_WARNING, - "%d bytes of buffered data lost during conversion to FILE*!", + "%d bytes of buffered data lost during conversion!", stream->writepos - stream->readpos); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php