helly Sun Mar 6 19:17:51 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/ext/standard file.c
Log:
- MFH Allow length 0 as default (e.g. skip param)
http://cvs.php.net/diff.php/php-src/ext/standard/file.c?r1=1.382.2.4&r2=1.382.2.5&ty=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.382.2.4
php-src/ext/standard/file.c:1.382.2.5
--- php-src/ext/standard/file.c:1.382.2.4 Wed Mar 2 22:30:23 2005
+++ php-src/ext/standard/file.c Sun Mar 6 19:17:51 2005
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.382.2.4 2005/03/03 03:30:23 iliaa Exp $ */
+/* $Id: file.c,v 1.382.2.5 2005/03/07 00:17:51 helly Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -1780,6 +1780,8 @@
if (len < 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Length parameter may not be negative");
RETURN_FALSE;
+ } else if (len == 0) {
+ len = 1;
}
} else {
len = -1;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php