diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2016-11-03 05:23:32 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2016-11-03 05:23:32 +0300 |
commit | a27fa815bbcffab3352214786eb1884f55d6ffa6 (patch) | |
tree | 87b95022d561777346da4a795368c4ce4d672669 /core/Filechecks.php | |
parent | 04ae85b1c47754552e429faa0be3e7d48ac8a080 (diff) |
fix a posix function was called that may not exist on the server (#10825)
Diffstat (limited to 'core/Filechecks.php')
-rw-r--r-- | core/Filechecks.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/core/Filechecks.php b/core/Filechecks.php index 387fa244ca..33e65c9055 100644 --- a/core/Filechecks.php +++ b/core/Filechecks.php @@ -310,11 +310,19 @@ class Filechecks return ''; } - $group = posix_getgrgid($stat[5]); - $group = $group['name']; + if (function_exists('posix_getgrgid')) { + $group = posix_getgrgid($stat[5]); + $group = $group['name']; + } else { + return ''; + } - $user = posix_getpwuid($stat[4]); - $user = $user['name']; + if (function_exists('posix_getpwuid')) { + $user = posix_getpwuid($stat[4]); + $user = $user['name']; + } else { + return ''; + } return "$user:$group"; } |