php 5.3 compatiblity

This commit is contained in:
kremsy
2014-04-20 14:52:26 +02:00
committed by Steffen Schröder
parent ea9c929ec3
commit 7408ffb4ac
11 changed files with 165 additions and 148 deletions

View File

@ -93,10 +93,11 @@ class UsageReporter implements TimerListener {
$json = json_encode($properties);
$info = base64_encode($json);
$this->maniaControl->fileReader->loadFile(ManiaControl::URL_WEBSERVICE . "/usagereport?info=" . urlencode($info), function ($response, $error) {
$self = $this;
$this->maniaControl->fileReader->loadFile(ManiaControl::URL_WEBSERVICE . "/usagereport?info=" . urlencode($info), function ($response, $error) use(&$self){
$response = json_decode($response);
if ($error || !$response) {
$this->maniaControl->log("Error while Sending data: " . $error);
$self->maniaControl->log("Error while Sending data: " . $error);
}
});
}