wez             Thu Sep 26 12:22:28 2002 EDT

  Modified files:              
    /php4/main  streams.c 
  Log:
  Fix for #19580. (Incorrectly warning about lost data when that is not the
  case on systems without fopencookie).
  
  
Index: php4/main/streams.c
diff -u php4/main/streams.c:1.83 php4/main/streams.c:1.84
--- php4/main/streams.c:1.83    Thu Sep 26 08:12:27 2002
+++ php4/main/streams.c Thu Sep 26 12:22:28 2002
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: streams.c,v 1.83 2002/09/26 12:12:27 wez Exp $ */
+/* $Id: streams.c,v 1.84 2002/09/26 16:22:28 wez Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -1580,7 +1580,7 @@
 
 exit_success:
 
-       if (stream->writepos && stream->fclose_stdiocast != 
PHP_STREAM_FCLOSE_FOPENCOOKIE) {
+       if ((stream->writepos - stream->readpos) > 0 && stream->fclose_stdiocast != 
+PHP_STREAM_FCLOSE_FOPENCOOKIE) {
                /* the data we have buffered will be lost to the third party library 
that
                 * will be accessing the stream.  Emit a warning so that the end-user 
will
                 * know that they should try something else */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to