]> granicus.if.org Git - php/commitdiff
ws pollution removed.
authorfoobar <sniper@php.net>
Sat, 7 Apr 2001 21:46:43 +0000 (21:46 +0000)
committerfoobar <sniper@php.net>
Sat, 7 Apr 2001 21:46:43 +0000 (21:46 +0000)
ext/standard/file.c

index e2062405b5a8975b1f1d75d67379bd1d25516f26..79e42f8a74e5f75132a863df893ca58ed1577dd4 100644 (file)
@@ -906,15 +906,17 @@ PHP_FUNCTION(fgets)
 
        convert_to_long_ex(arg2);
        len = (*arg2)->value.lval;
-    if (len < 0) {
+
+       if (len < 0) {
                php_error(E_WARNING, "length parameter to fgets() may not be negative");
                RETURN_FALSE;
-    }
+       }
 
        if (type == le_socket) {
                issock=1;
                socketd=*(int*)what;
        }
+
        buf = emalloc(sizeof(char) * (len + 1));
        /* needed because recv doesnt put a null at the end*/
        memset(buf,0,len+1);