summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-07-23 11:45:07 +0200
committerSimon Rettberg2024-07-23 11:45:07 +0200
commit4f7dc7b5ee593a5fec3196f98505b6c62c0b45f6 (patch)
tree27a21790e280ba6407d49a636b54751a5e768688
parent[sysconfig] Add button to assign module to multiple configs (diff)
downloadslx-admin-4f7dc7b5ee593a5fec3196f98505b6c62c0b45f6.tar.gz
slx-admin-4f7dc7b5ee593a5fec3196f98505b6c62c0b45f6.tar.xz
slx-admin-4f7dc7b5ee593a5fec3196f98505b6c62c0b45f6.zip
[statistics_reporting] Fix undefined variable access
This had no consequence as $start could only be undefined if $bounds is false, in which case the variable $sh was never read, but still, avoid the warning.
-rw-r--r--modules-available/statistics_reporting/inc/queries.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules-available/statistics_reporting/inc/queries.inc.php b/modules-available/statistics_reporting/inc/queries.inc.php
index 410f9517..14849a19 100644
--- a/modules-available/statistics_reporting/inc/queries.inc.php
+++ b/modules-available/statistics_reporting/inc/queries.inc.php
@@ -229,7 +229,7 @@ class Queries
*/
$machine[$row['typeid']] += self::timeDiff($start, $end, $bounds);
}
- $sh = date('G', $start);
+ $sh = date('G', $start ?? 0);
if ($row['typeid'] === 'totalSessionTime' && ($bounds === false || ($sh >= $bounds[0] && $sh < $bounds[1]))) {
if ($row['data'] >= 60) {
$machine['longSessions'] += 1;