From 7fbc91acce9514bdbc995decc8f1166d77df82b9 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Mon, 7 Mar 2005 00:16:18 +0000 Subject: [PATCH] - Allow length 0 as default (e.g. skip param) --- ext/standard/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/standard/file.c b/ext/standard/file.c index a371dac4913..31121cf2b44 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1956,6 +1956,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;