From 1a94d589ba2cb89b0f7de5d130e0f7a011ff5551 Mon Sep 17 00:00:00 2001 From: kremsy Date: Mon, 10 Feb 2014 15:26:08 +0100 Subject: [PATCH] error handler fix --- application/core/ErrorHandler.php | 12 ++++++++++-- application/core/ManiaControl.php | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/application/core/ErrorHandler.php b/application/core/ErrorHandler.php index d3c8981f..5c74174f 100644 --- a/application/core/ErrorHandler.php +++ b/application/core/ErrorHandler.php @@ -39,7 +39,11 @@ class ErrorHandler { $error['ManiaControlVersion'] = ManiaControl::VERSION; $error['OperatingSystem'] = php_uname(); $error['PHPVersion'] = phpversion(); - $error['ServerLogin'] = null; + if ($this->maniaControl->server != null) { + $error['ServerLogin'] = $this->maniaControl->server->login; + } else { + $error['ServerLogin'] = null; + } $json = json_encode($error); $info = base64_encode($json); @@ -80,7 +84,11 @@ class ErrorHandler { $error['ManiaControlVersion'] = ManiaControl::VERSION; $error['OperatingSystem'] = php_uname(); $error['PHPVersion'] = phpversion(); - $error['ServerLogin'] = $this->maniaControl->server->login; + if ($this->maniaControl->server != null) { + $error['ServerLogin'] = $this->maniaControl->server->login; + } else { + $error['ServerLogin'] = null; + } $json = json_encode($error); $info = base64_encode($json); diff --git a/application/core/ManiaControl.php b/application/core/ManiaControl.php index 02463fda..f8fbc85d 100644 --- a/application/core/ManiaControl.php +++ b/application/core/ManiaControl.php @@ -29,8 +29,9 @@ require_once __DIR__ . '/FML/autoload.php'; /** * ManiaControl Server Controller for ManiaPlanet Server * + * @author steeffeen & kremsy * @copyright ManiaControl Copyright © 2014 ManiaControl Team - * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 + * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 */ class ManiaControl implements CommandListener { /**