fixed exceptions

This commit is contained in:
kremsy
2014-03-13 18:25:29 +01:00
committed by Steffen Schröder
parent 689e572c62
commit d3cc9db29c
5 changed files with 44 additions and 11 deletions

View File

@ -98,7 +98,9 @@ class ManiaExchangeManager {
* @param $mxId
*/
public function unsetMap($mxId) {
unset($this->mxIdUidVector[$mxId]);
if (isset($this->mxIdUidVector[$mxId])) {
unset($this->mxIdUidVector[$mxId]);
}
}
/**
@ -272,9 +274,9 @@ class ManiaExchangeManager {
// compile search URL
$url = 'http://' . $titlePrefix . '.mania-exchange.com/tracksearch?api=on';
$game = explode('@', $titleId);
$game = explode('@', $titleId);
$envNumber = $this->getEnvironment($game[0]);
if($env != '' || $envNumber != -1){
if ($env != '' || $envNumber != -1) {
$url .= '&environments=' . $envNumber;
}
if ($name != '') {