mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: Don’t assume posix_getpwuid is available.
Fixes https://github.com/silverstripe/silverstripe-framework/issues/2494 In Silverstripe 3.1, on some shared hosts the following bug can occur: Warning: posix_getpwuid() has been disabled for security reasons
This commit is contained in:
parent
93e92e49c5
commit
40d9bbfd69
@ -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'];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user