projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
397ee76
)
Remove posix_getlogin() check from posix_getpwnam() test
author
Nikita Popov
<nikita.ppv@gmail.com>
Wed, 10 Apr 2019 12:43:52 +0000
(14:43 +0200)
committer
Nikita Popov
<nikita.ppv@gmail.com>
Wed, 10 Apr 2019 12:43:52 +0000
(14:43 +0200)
It doesn't make sense to pass false to posix_getpwnam(). I'm not
sure what exactly this is guarding against, but it won't work in
this form.
ext/posix/tests/posix_getpwnam_basic_01.phpt
patch
|
blob
|
history
diff --git
a/ext/posix/tests/posix_getpwnam_basic_01.phpt
b/ext/posix/tests/posix_getpwnam_basic_01.phpt
index 23604b6ff0e7d197fcb034972d43fd1dad46f15b..e45b6fa95dfdd6daddc8299b6e48c83d45a5e212 100644
(file)
--- a/
ext/posix/tests/posix_getpwnam_basic_01.phpt
+++ b/
ext/posix/tests/posix_getpwnam_basic_01.phpt
@@
-12,9
+12,6
@@
User Group: PHPSP #phptestfestbrasil
$uid = posix_geteuid();
$user = posix_getpwuid($uid);
$username = $user['name'];
- if (posix_getlogin() == false) {
- $username = false;
- }
$info = posix_getpwnam($username);
print_r($info);
var_dump($username == $info['name']);