]> granicus.if.org Git - php/commitdiff
The user argument cannot be NULL here - fixes 2 tests
authorRasmus Lerdorf <rasmus@php.net>
Thu, 6 Aug 2009 10:56:00 +0000 (10:56 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Thu, 6 Aug 2009 10:56:00 +0000 (10:56 +0000)
ext/posix/posix.c

index 49e91ea56ef3db41eb2ff77711b7774be478bf2f..7c2931a8657134a4b88795bbb5b764fcc82a905c 100644 (file)
@@ -1196,6 +1196,8 @@ PHP_FUNCTION(posix_initgroups)
                RETURN_FALSE;
        }
 
+       if(strlen(name)==0) RETURN_FALSE;
+
        RETURN_BOOL(!initgroups((const char *)name, basegid));
 }
 /* }}} */