From f694023f7da19e4d4555733e8738111be2068fab Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sat, 17 Dec 2016 17:03:09 +0100 Subject: [PATCH] bridges: Return default values for getName and getURI --- bridges/AnimeUltimeBridge.php | 14 +++++++++----- bridges/DailymotionBridge.php | 1 + bridges/GBAtempBridge.php | 14 +++++++++----- bridges/MangareaderBridge.php | 1 + 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/bridges/AnimeUltimeBridge.php b/bridges/AnimeUltimeBridge.php index ef87499..aea376b 100644 --- a/bridges/AnimeUltimeBridge.php +++ b/bridges/AnimeUltimeBridge.php @@ -108,12 +108,16 @@ class AnimeUltimeBridge extends BridgeAbstract { } public function getName() { - $typeFilter = array_search( - $this->getInput('type'), - self::PARAMETERS[$this->queriedContext]['type']['values'] - ); + if(!is_null($this->getInput('type'))){ + $typeFilter = array_search( + $this->getInput('type'), + self::PARAMETERS[$this->queriedContext]['type']['values'] + ); - return 'Latest '.$typeFilter.' - Anime-Ultime Bridge'; + return 'Latest '.$typeFilter.' - Anime-Ultime Bridge'; + } + + return parent::getName(); } } diff --git a/bridges/DailymotionBridge.php b/bridges/DailymotionBridge.php index 9547bab..3cb882f 100644 --- a/bridges/DailymotionBridge.php +++ b/bridges/DailymotionBridge.php @@ -85,6 +85,7 @@ class DailymotionBridge extends BridgeAbstract{ case 'From search results': $specific=$this->getInput('s'); break; + default: return parent::getName(); } return $specific.' : Dailymotion Bridge'; diff --git a/bridges/GBAtempBridge.php b/bridges/GBAtempBridge.php index a171aff..cf0c8e0 100644 --- a/bridges/GBAtempBridge.php +++ b/bridges/GBAtempBridge.php @@ -115,10 +115,14 @@ class GBAtempBridge extends BridgeAbstract { } public function getName() { - $type=array_search( - $this->getInput('type'), - self::PARAMETERS[$this->queriedContext]['type']['values'] - ); - return 'GBAtemp '.$type.' Bridge'; + if(!is_null($this->getInput('type'))){ + $type=array_search( + $this->getInput('type'), + self::PARAMETERS[$this->queriedContext]['type']['values'] + ); + return 'GBAtemp '.$type.' Bridge'; + } + + return parent::getName(); } } diff --git a/bridges/MangareaderBridge.php b/bridges/MangareaderBridge.php index 949e7a4..1a408e3 100644 --- a/bridges/MangareaderBridge.php +++ b/bridges/MangareaderBridge.php @@ -239,6 +239,7 @@ EOD; case 'Get manga updates': $path = $this->getInput('path'); break; + default: return parent::getURI(); } return self::URI . $path; }