From 00999702482329e063500f32d643f109ce735507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Tue, 22 Apr 2014 17:18:27 +0200 Subject: [PATCH] resolved todo --- application/plugins/Dedimania/Dedimania.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/application/plugins/Dedimania/Dedimania.php b/application/plugins/Dedimania/Dedimania.php index ffafd77b..983718bd 100644 --- a/application/plugins/Dedimania/Dedimania.php +++ b/application/plugins/Dedimania/Dedimania.php @@ -329,9 +329,10 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu $content = $this->encode_request(self::DEDIMANIA_SETCHALLENGETIMES, $data); $self = $this; - $this->maniaControl->fileReader->postData(self::DEDIMANIA_URL, function ($data, $error) use (&$self) { + $maniaControl = $this->maniaControl; + $this->maniaControl->fileReader->postData(self::DEDIMANIA_URL, function ($data, $error) use (&$self, &$maniaControl) { if ($error != '') { - $self->maniaControl->log("Dedimania Error: " . $error); + $maniaControl->log("Dedimania Error: " . $error); } $data = $self->decode($data); @@ -351,7 +352,10 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu // Warnings and TTR $errors = $methodResponse[0]['methods'][0]['errors']; - //TODO ? + if ($errors) { + $maniaControl->errorHandler->triggerDebugNotice($errors); + // TODO: check if this is sufficient + } } } }