-
-
Save cmb69/ccd5cf30c1cd247872a9dfeab9874330 to your computer and use it in GitHub Desktop.
Crazystat patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stat/src/analyze.php | 2 +- | |
stat/src/module_out.php | 3 ++- | |
2 files changed, 3 insertions(+), 2 deletions(-) | |
diff --git a/stat/src/analyze.php b/stat/src/analyze.php | |
index a4a0dae..fb28b0b 100644 | |
--- a/stat/src/analyze.php | |
+++ b/stat/src/analyze.php | |
@@ -856,7 +856,7 @@ if (empty($message_fatal)) { | |
$_SESSION['module_' . $modul . '_max'] = 0; | |
$_SESSION['module_' . $modul . '_max_name'] = ''; | |
foreach ($_SESSION['module_' . $modul . '_data'] as $eintrag => $wert) { | |
- $_SESSION['module_' . $modul . '_total'] += $wert; | |
+ $_SESSION['module_' . $modul . '_total'] += (int)$wert; | |
if (!isset($_SESSION['module_' . $modul . '_max']) | |
|| $_SESSION['module_' . $modul . '_max'] < $wert) { | |
$_SESSION['module_' . $modul . '_max'] = $wert; | |
diff --git a/stat/src/module_out.php b/stat/src/module_out.php | |
index 963392b..43c248e 100644 | |
--- a/stat/src/module_out.php | |
+++ b/stat/src/module_out.php | |
@@ -630,7 +630,8 @@ function module_out($modul) { | |
$separate = true; | |
} else | |
$separate = false; | |
- list($eintrag, $anzahl) = each($module_werte); | |
+ $eintrag = key($module_werte); | |
+ $anzahl = current($module_werte); | |
if (!isset($config_stat_limit[$modul]) | |
|| ($_SESSION['set_' . $modul . '_all'] | |
|| $i < $config_stat_limit[$modul])) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment