mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Skip posix_getpwuid in upgrader if posix isn’t installed
We don’t need it for anything else, so no need to require it. Posix not being installed usually means it’s a windows machine.
This commit is contained in:
parent
6f99ce2b07
commit
615051cf66
|
@ -3,8 +3,8 @@
|
|||
|
||||
$required_version = '7.2.0';
|
||||
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
echo "Skipping user check as it is not supported on Windows\n";
|
||||
if ((strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') || (!function_exists('posix_getpwuid'))) {
|
||||
echo "Skipping user check as it is not supported on Windows or Posix is not installed on this server. \n";
|
||||
} else {
|
||||
$pwu_data = posix_getpwuid(posix_geteuid());
|
||||
$username = $pwu_data['name'];
|
||||
|
|
Loading…
Reference in a new issue