Merge pull request #6951 from sminnee/fix-2494

FIX: Don’t assume posix_getpwuid is available.
This commit is contained in:
Damian Mooyman 2017-05-23 13:10:56 +12:00 committed by GitHub
commit 7e2f8d1f2d

View File

@ -34,7 +34,7 @@ function getTempFolderUsername()
if (!$user) {
$user = getenv('USERNAME');
}
if (!$user && function_exists('posix_getuid')) {
if (!$user && function_exists('posix_getpwuid') && function_exists('posix_getuid')) {
$userDetails = posix_getpwuid(posix_getuid());
$user = $userDetails['name'];
}