1
0
Fork 0
forked from blallo/rss-bridge

[WordPressBridge] fix fatal errors

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-09-15 11:13:18 +02:00
parent b5358d6cea
commit 4c3b80fca9

View file

@ -49,13 +49,18 @@ class WordPressBridge extends FeedExpander {
return $item;
}
public function getURI(){
$url = $this->getInput('url');
return $url;
}
public function collectData(){
if(substr($this->getInput(url),0,srlen('http'))!=='http'){
if(substr($this->getInput('url'),0,strlen('http'))!=='http'){
// just in case someone find a way to access local files by playing with the url
returnClientError('The url parameter must either refer to http or https protocol.');
$this->returnClientError('The url parameter must either refer to http or https protocol.');
}
$this->collectExpandableDatas($this->getURI().'/feed/atom');
$this->collectExpandableDatas($this->getURI().'/feed/atom/');
}