From 4a11043dcd23bfe810e6c9f777b85f063ccd4180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Sat, 14 Jun 2014 19:45:32 +0200 Subject: [PATCH] added params for more info about issue --- application/core/ErrorHandler.php | 2 +- .../core/ManiaExchange/ManiaExchangeManager.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/application/core/ErrorHandler.php b/application/core/ErrorHandler.php index 34cab7ea..8d1cc00e 100644 --- a/application/core/ErrorHandler.php +++ b/application/core/ErrorHandler.php @@ -412,4 +412,4 @@ class ErrorHandler { $setting = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_RESTART_ON_EXCEPTION, true); return $setting; } -} \ No newline at end of file +} diff --git a/application/core/ManiaExchange/ManiaExchangeManager.php b/application/core/ManiaExchange/ManiaExchangeManager.php index 8a7e8509..a6c890b8 100644 --- a/application/core/ManiaExchange/ManiaExchangeManager.php +++ b/application/core/ManiaExchange/ManiaExchangeManager.php @@ -75,12 +75,12 @@ class ManiaExchangeManager { * @param mixed $maps */ public function fetchManiaExchangeMapInformation($maps = null) { - if (!$maps) { - //Fetch Information for whole MapList - $maps = $this->maniaControl->mapManager->getMaps(); + if ($maps) { + // Fetch Information for a single map + $maps = array($maps); } else { - //Fetch Information for a single map - $maps = (array)$maps; + // Fetch Information for whole MapList + $maps = $this->maniaControl->mapManager->getMaps(); } $mysqli = $this->maniaControl->database->mysqli; @@ -99,7 +99,7 @@ class ManiaExchangeManager { foreach ($maps as $map) { if (!$map) { // TODO: remove after resolving of error report about "non-object" - $this->maniaControl->errorHandler->triggerDebugNotice('Non-Object-Map: ' . print_r($map, true)); + $this->maniaControl->errorHandler->triggerDebugNotice('Non-Object-Map', $map, $maps); continue; } /** @var Map $map */