From: Marcus Boerger Date: Mon, 7 Mar 2005 22:10:08 +0000 (+0000) Subject: - Fix proto X-Git-Tag: RELEASE_0_3~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6bd825760716ffbf592d658d90fe03cfc107cee9;p=php - Fix proto - Do not try to write zero bytes --- diff --git a/ext/standard/file.c b/ext/standard/file.c index 7d8fd5ceac..8634f88f60 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1238,6 +1238,10 @@ PHPAPI PHP_FUNCTION(fwrite) break; } + if (!num_bytes) { + RETURN_LONG(0); + } + PHP_STREAM_TO_ZVAL(stream, arg1); if (PG(magic_quotes_runtime)) { @@ -1572,7 +1576,7 @@ PHP_NAMED_FUNCTION(php_if_ftruncate) } /* }}} */ -/* {{{ proto int fstat(resource fp) +/* {{{ proto array fstat(resource fp) Stat() on a filehandle */ PHP_NAMED_FUNCTION(php_if_fstat) {