1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-31 13:50:23 +02:00

[bridges] fix invalid use of empty() for php < 5.5

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière
2016-09-01 22:53:01 +02:00
parent c642fca0d0
commit 948bd9ae31
7 changed files with 18 additions and 16 deletions

View File

@@ -37,7 +37,8 @@ class CNETBridge extends BridgeAbstract {
return $article_html;
}
$pageUrl = $this->uri.(empty($this->getInput('topic')) ? '' : 'topics/'.$this->getInput('topic').'/');
$topic=$this->getInput('topic');
$pageUrl = $this->uri.(empty($topic) ? '' : 'topics/'.$topic.'/');
$html = $this->getSimpleHTMLDOM($pageUrl) or $this->returnServerError('Could not request CNET: '.$pageUrl);
$limit = 0;
@@ -69,7 +70,8 @@ class CNETBridge extends BridgeAbstract {
}
public function getName() {
return 'CNET News Bridge'.(empty($this->getInput('topic')) ? '' : ' - '.$this->getInput('topic'));
$topic=$this->getInput('topic');
return 'CNET News Bridge'.(empty($topic) ? '' : ' - '.$topic);
}
public function getCacheDuration() {