]> granicus.if.org Git - php/commitdiff
- Return number of bytes written instead of just TRUE. (Path by Paul Hudson,
authorDerick Rethans <derick@php.net>
Sat, 28 Jun 2003 08:21:02 +0000 (08:21 +0000)
committerDerick Rethans <derick@php.net>
Sat, 28 Jun 2003 08:21:02 +0000 (08:21 +0000)
  hudzilla@php.net)

ext/standard/file.c

index 4b46bd43080d909a0cfb1929b9f24b08bcd96d37..060d5ba078247e8826cb0de6dc2417194d918ae4 100644 (file)
@@ -474,8 +474,8 @@ PHP_FUNCTION(file_get_contents)
 }
 /* }}} */
 
-/* {{{ proto string file_put_contents(string file, string data[, int flags[, resource context]])
-   Write/Create a file with contents data */
+/* {{{ proto int file_put_contents(string file, string data[, int flags[, resource context]])
+   Write/Create a file with contents data and returns the number */
 PHP_FUNCTION(file_put_contents)
 {
        php_stream *stream;
@@ -506,7 +506,7 @@ PHP_FUNCTION(file_put_contents)
        }
        php_stream_close(stream);
        
-       RETURN_TRUE;
+       RETURN_LONG(numbytes);
 }
 /* }}} */