[RedditBridge] Error 0: Call to a member function getBody() on array [L154]
Describe the bug When executing the bridge, it gives an error 0.
Details
Type: Error Code: 0 Message: Call to a member function getBody() on array File: bridges/RedditBridge.php Line: 154
Trace
#0 index.php(72): RssBridge->main() #1 lib/RssBridge.php(103): DisplayAction->execute() #2 actions/DisplayAction.php(68): DisplayAction->createResponse() #3 actions/DisplayAction.php(117): RedditBridge->collectData() #4 bridges/RedditBridge.php(105): RedditBridge->collectDataInternal() #5 bridges/RedditBridge.php(154)
Context
Query: action=display&bridge=RedditBridge&r=all&format=html
To Reproduce Steps to reproduce the behavior:
- Go to 'RedditBridge'
- Select any bridge type
- Click on 'Generate Feed'
- See error
Screenshots
Additional context There seems to have been some change in the response, that instead of a object, it's an array.
Is anyone else also experiencing this? If so, I'll raise a PR.
Workaround
Replace https://github.com/RSS-Bridge/rss-bridge/blob/master/bridges/RedditBridge.php#L154 with $json = end($response);
Unclear to me why this happens but I think it's an old cache value.
Clearing cache will probably fix it.