summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2005-03-07 00:17:51 +0000
committerMarcus Boerger <helly@php.net>2005-03-07 00:17:51 +0000
commit1ecb6ccd16adb28610ce9915fbd8d020125f6f6f (patch)
tree88dd2687b16ffeadd9c976d3d55b406212005596
parent5be2acc65d4c8cbc954d40576a03a8ce8159d9dc (diff)
downloadphp-git-1ecb6ccd16adb28610ce9915fbd8d020125f6f6f.tar.gz
- MFH Allow length 0 as default (e.g. skip param)
-rw-r--r--ext/standard/file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 77b0b79f9c..f6974d4e49 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -1780,6 +1780,8 @@ PHP_FUNCTION(fgetcsv)
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;