mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #10299 from edwilde/patch-14
Fix error when `posix_getpwuid` returns false
This commit is contained in:
commit
baaa323644
@ -39,7 +39,7 @@ class TempFolder
|
||||
$user = '';
|
||||
if (function_exists('posix_getpwuid') && function_exists('posix_getuid')) {
|
||||
$userDetails = posix_getpwuid(posix_getuid());
|
||||
$user = $userDetails['name'];
|
||||
$user = $userDetails['name'] ?? false;
|
||||
}
|
||||
if (!$user) {
|
||||
$user = Environment::getEnv('APACHE_RUN_USER');
|
||||
|
Loading…
Reference in New Issue
Block a user