]> 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 4a5198956e5f0cf57e2b4551d9eee7a37ee0b7ca..8946634235d08cf7e169123312e17be2b721c4b4 100644 (file)
@@ -1361,6 +1361,8 @@ PHP_FUNCTION(posix_initgroups)
                RETURN_FALSE;
        }
 
+       if(strlen(name)==0) RETURN_FALSE;
+
        RETURN_BOOL(!initgroups((const char *)name, basegid));
 }
 /* }}} */