mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-13 20:14:10 +02:00
bridges: remove redundant "or returnServerError" after getContents/getSimpleHTMLDom/getSimpleHTMLDomCached (#2398)
When fetching website contents, exceptions already raise on fetching error
This commit is contained in:
@@ -15,8 +15,7 @@ class PatreonBridge extends BridgeAbstract {
|
||||
));
|
||||
|
||||
public function collectData(){
|
||||
$html = getSimpleHTMLDOMCached($this->getURI(), 86400)
|
||||
or returnServerError('Failed to load creator page at ' . $this->getURI());
|
||||
$html = getSimpleHTMLDOMCached($this->getURI(), 86400);
|
||||
$regex = '#/api/campaigns/([0-9]+)#';
|
||||
if(preg_match($regex, $html->save(), $matches) > 0) {
|
||||
$campaign_id = $matches[1];
|
||||
@@ -168,8 +167,7 @@ class PatreonBridge extends BridgeAbstract {
|
||||
))
|
||||
);
|
||||
|
||||
$data = json_decode(getContents($url, $header, $opts))
|
||||
or returnServerError('API request to "' . $url . '" failed.');
|
||||
$data = json_decode(getContents($url, $header, $opts));
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
Reference in New Issue
Block a user