diff options
-rw-r--r-- | inc/database.inc.php | 4 | ||||
-rw-r--r-- | inc/taskmanager.inc.php | 2 | ||||
-rw-r--r-- | modules-available/statistics/pages/summary.inc.php | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/inc/database.inc.php b/inc/database.inc.php index 81fd3259..0c8f40ae 100644 --- a/inc/database.inc.php +++ b/inc/database.inc.php @@ -268,7 +268,7 @@ class Database $log = true; } foreach ($row as $key => $col) { - $l = strlen($col); + $l = strlen((string)($col ?? 'NULL')); if ($l > $lens[$key]) { $lens[$key] = $l; } @@ -289,7 +289,7 @@ class Database foreach ($rows as $row) { $line = ''; foreach ($lens as $key => $len) { - $line .= '| '. str_pad($row[$key], $len) . ' '; + $line .= '| '. str_pad((string)($row[$key] ?? 'NULL'), $len) . ' '; } error_log($line . "|"); } diff --git a/inc/taskmanager.inc.php b/inc/taskmanager.inc.php index 4e534018..700ea4ad 100644 --- a/inc/taskmanager.inc.php +++ b/inc/taskmanager.inc.php @@ -141,7 +141,7 @@ class Taskmanager $done = false; $deadline = microtime(true) + $timeout / 1000; while (($remaining = $deadline - microtime(true)) > 0) { - usleep(min(100000, $remaining * 100000)); + usleep((int)min(100000, $remaining * 100000)); $status = self::status($task); if (!isset($status['statusCode'])) break; diff --git a/modules-available/statistics/pages/summary.inc.php b/modules-available/statistics/pages/summary.inc.php index ce16b536..8b476f36 100644 --- a/modules-available/statistics/pages/summary.inc.php +++ b/modules-available/statistics/pages/summary.inc.php @@ -26,7 +26,9 @@ class SubPage // Prepare chart colors self::$STATS_COLORS = []; for ($i = 0; $i < 10; ++$i) { - self::$STATS_COLORS[] = '#55' . sprintf('%02s%02s', dechex((($i + 1) * ($i + 1)) / .3922), dechex(abs((5 - $i) * 51))); + self::$STATS_COLORS[] = '#55' . sprintf('%02s%02s', dechex( + (int)((($i + 1) * ($i + 1)) / .3922)), + dechex((int)(abs((5 - $i) * 51)))); } $filterSet->filterNonClients(); |