helly Mon Mar 7 17:10:08 2005 EDT Modified files: /php-src/ext/standard file.c Log: - Fix proto - Do not try to write zero bytes http://cvs.php.net/diff.php/php-src/ext/standard/file.c?r1=1.403&r2=1.404&ty=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.403 php-src/ext/standard/file.c:1.404 --- php-src/ext/standard/file.c:1.403 Mon Mar 7 16:54:08 2005 +++ php-src/ext/standard/file.c Mon Mar 7 17:10:08 2005 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.403 2005/03/07 21:54:08 helly Exp $ */ +/* $Id: file.c,v 1.404 2005/03/07 22:10:08 helly Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1238,6 +1238,10 @@ break; } + if (!num_bytes) { + RETURN_LONG(0); + } + PHP_STREAM_TO_ZVAL(stream, arg1); if (PG(magic_quotes_runtime)) { @@ -1572,7 +1576,7 @@ } /* }}} */ -/* {{{ proto int fstat(resource fp) +/* {{{ proto array fstat(resource fp) Stat() on a filehandle */ PHP_NAMED_FUNCTION(php_if_fstat) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php