summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics_reporting
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/statistics_reporting')
-rw-r--r--modules-available/statistics_reporting/inc/remotereport.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/statistics_reporting/inc/remotereport.inc.php b/modules-available/statistics_reporting/inc/remotereport.inc.php
index e1f2d20e..fdd32f57 100644
--- a/modules-available/statistics_reporting/inc/remotereport.inc.php
+++ b/modules-available/statistics_reporting/inc/remotereport.inc.php
@@ -129,8 +129,8 @@ class RemoteReport
$data['swapUsed'] = ($mem['SwapTotal'] - $mem['SwapFree']);
}
- $data['ip'] = $_SERVER['SERVER_ADDR'];
- $data['hostname'] = strtolower(gethostbyaddr($_SERVER['SERVER_ADDR']));
+ $data['ip'] = $_SERVER['SERVER_ADDR'] ?? Property::getServerIp();
+ $data['hostname'] = strtolower(gethostbyaddr($_SERVER['SERVER_ADDR'] ?? Property::getServerIp()));
$data['osID'] = $osInfo['ID'];
$data['osVersionID'] = $osInfo['VERSION_ID'];