From 0680b75cc5c972f35a12abec32e7be5f5e487716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Mon, 1 Sep 2014 03:28:51 +0200 Subject: [PATCH] check for existence of mx data --- application/core/Maps/MapManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index 1a407e92..91e602c3 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -578,12 +578,12 @@ class MapManager implements CallbackListener { /** * Get's a Map by it's Mania-Exchange Id * - * @param $mxId + * @param int $mxId * @return Map */ public function getMapByMxId($mxId) { foreach ($this->maps as $map) { - if ($map->mx->id == $mxId) { + if ($map->mx && $map->mx->id == $mxId) { return $map; } }