From 6787012047d2f9b06e01f17ea5ee800901304f2e Mon Sep 17 00:00:00 2001 From: kremsy Date: Thu, 13 Feb 2014 20:46:40 +0100 Subject: [PATCH] small fix --- application/core/Statistics/StatisticCollector.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/core/Statistics/StatisticCollector.php b/application/core/Statistics/StatisticCollector.php index 131a3c7e..45bd26a3 100644 --- a/application/core/Statistics/StatisticCollector.php +++ b/application/core/Statistics/StatisticCollector.php @@ -268,9 +268,9 @@ class StatisticCollector implements CallbackListener { } break; case 'LibXmlRpc_OnArmorEmpty': - $shooter = $this->maniaControl->playerManager->getPlayer($callback[1][1][0]); - $victim = $this->maniaControl->playerManager->getPlayer($callback[1][1][1]); - if ($shooter != null) { + $victim = $this->maniaControl->playerManager->getPlayer($callback[1][1][1]); + if (isset($callback[1][1][0])) { + $shooter = $this->maniaControl->playerManager->getPlayer($callback[1][1][0]); $this->maniaControl->statisticManager->incrementStat(self::STAT_ON_KILL, $shooter); } $this->maniaControl->statisticManager->incrementStat(self::STAT_ON_DEATH, $victim);