diff --git a/application/core/Statistics/SimpleStatsList.php b/application/core/Statistics/SimpleStatsList.php index 528400f7..5e6a1761 100644 --- a/application/core/Statistics/SimpleStatsList.php +++ b/application/core/Statistics/SimpleStatsList.php @@ -175,6 +175,9 @@ class SimpleStatsList implements ManialinkPageAnswerListener, CallbackListener, //Description Label $i = 2; foreach($this->statArray as $statArray) { + if(!isset($labels[$i])) + break; + /** @var Label_Text $labels [] */ $labels[$i]->setAction(self::ACTION_SORT_STATS . '.' . $statArray["Name"]); $script->addTooltip($labels[$i], $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => '$o ' . $statArray["Name"])); diff --git a/application/core/Statistics/StatisticCollector.php b/application/core/Statistics/StatisticCollector.php index 59a89ced..7478a45e 100644 --- a/application/core/Statistics/StatisticCollector.php +++ b/application/core/Statistics/StatisticCollector.php @@ -222,7 +222,7 @@ class StatisticCollector implements CallbackListener { switch($callbackName) { case 'LibXmlRpc_OnShoot': - $this->handleOnShoot($callback[1][1][0], $callback[1][1][3]); + $this->handleOnShoot($callback[1][1][0], $callback[1][1][1]); break; case 'LibXmlRpc_OnHit': $shooter = $this->maniaControl->playerManager->getPlayer($callback[1][1][0]);