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;