mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

The issue was that passwd was empty for the issue reporter, but the test expected passwd to be non-empty. An empty passwd can occur if there is no (encrypted) group password set up.
29 lines
532 B
PHP
29 lines
532 B
PHP
--TEST--
|
|
Test posix_getgrnam() function : basic functionality
|
|
--EXTENSIONS--
|
|
posix
|
|
--SKIPIF--
|
|
<?php
|
|
if (!posix_getgroups()) die('skip - groups unavailable (ci)');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$groupid = posix_getgroups()[0];
|
|
$group = posix_getgrgid($groupid);
|
|
$groupinfo = posix_getgrnam($group["name"]);
|
|
var_dump($groupinfo);
|
|
$groupinfo = posix_getgrnam("");
|
|
var_dump($groupinfo);
|
|
?>
|
|
--EXPECTF--
|
|
array(4) {
|
|
["name"]=>
|
|
string(%d) "%s"
|
|
["passwd"]=>
|
|
string(%d) "%S"
|
|
["members"]=>
|
|
%a
|
|
["gid"]=>
|
|
int(%d)
|
|
}
|
|
bool(false)
|