Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2016-11-03 05:23:32 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2016-11-03 05:23:32 +0300
commita27fa815bbcffab3352214786eb1884f55d6ffa6 (patch)
tree87b95022d561777346da4a795368c4ce4d672669 /core/Filechecks.php
parent04ae85b1c47754552e429faa0be3e7d48ac8a080 (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.php16
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";
}