From b6245a90c8d4724155973eca7852f9e2830c50e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Thu, 15 Sep 2016 12:35:52 +0200 Subject: [PATCH] [WordPressBridge] allow other bridges to use it as a parent class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/WordPressBridge.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bridges/WordPressBridge.php b/bridges/WordPressBridge.php index 0e9fd43b..cc3478c1 100644 --- a/bridges/WordPressBridge.php +++ b/bridges/WordPressBridge.php @@ -51,11 +51,14 @@ class WordPressBridge extends FeedExpander { public function getURI(){ $url = $this->getInput('url'); + if(empty($url)){ + $url = static::URI; + } return $url; } public function collectData(){ - if(substr($this->getInput('url'),0,strlen('http'))!=='http'){ + if($this->getInput('url') && substr($this->getInput('url'),0,strlen('http'))!=='http'){ // just in case someone find a way to access local files by playing with the url $this->returnClientError('The url parameter must either refer to http or https protocol.'); }