From 26c9024537990ce50b253001af15e3c2a17a189f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Wed, 19 Mar 2014 10:46:14 +0100 Subject: [PATCH] div by zero fix --- application/plugins/Endurance.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/plugins/Endurance.php b/application/plugins/Endurance.php index 36bcb70d..829c0b23 100644 --- a/application/plugins/Endurance.php +++ b/application/plugins/Endurance.php @@ -130,7 +130,7 @@ class EndurancePlugin implements CallbackListener, Plugin { */ public function callback_Checkpoint(array $callback) { $callbackData = json_decode($callback[1]); - if ($callbackData->Checkpoint % $this->currentMap->nbCheckpoints != 0) { + if (!$this->currentMap->nbCheckpoints || $callbackData->Checkpoint % $this->currentMap->nbCheckpoints != 0) { return; } $player = $this->maniaControl->playerManager->getPlayer($callbackData->Login);