mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-03 09:35:57 +02:00
bridges: Don't kill scripts with die()
Bridges should generally utilize the API functions instead of killing the script. Find more information on the Wiki. - returnServerError https://github.com/RSS-Bridge/rss-bridge/wiki/The-returnServerError-function - returnClientError https://github.com/RSS-Bridge/rss-bridge/wiki/The-returnClientError-function - returnError https://github.com/RSS-Bridge/rss-bridge/wiki/The-returnError-function
This commit is contained in:
parent
35bd706391
commit
3d231a417f
4 changed files with 16 additions and 14 deletions
|
@ -8,8 +8,8 @@ class GOGBridge extends BridgeAbstract {
|
|||
|
||||
public function collectData() {
|
||||
|
||||
$values = getContents('https://www.gog.com/games/ajax/filtered?limit=25&sort=new') or
|
||||
die('Unable to get the news pages from GOG !');
|
||||
$values = getContents('https://www.gog.com/games/ajax/filtered?limit=25&sort=new')
|
||||
or returnServerError('Unable to get the news pages from GOG !');
|
||||
$decodedValues = json_decode($values);
|
||||
|
||||
$limit = 0;
|
||||
|
@ -38,8 +38,8 @@ class GOGBridge extends BridgeAbstract {
|
|||
|
||||
private function buildGameContentPage($game) {
|
||||
|
||||
$gameDescriptionText = getContents('https://api.gog.com/products/' . $game->id . '?expand=description') or
|
||||
die('Unable to get game description from GOG !');
|
||||
$gameDescriptionText = getContents('https://api.gog.com/products/' . $game->id . '?expand=description')
|
||||
or returnServerError('Unable to get game description from GOG !');
|
||||
|
||||
$gameDescriptionValue = json_decode($gameDescriptionText);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue