rss-bridge icon indicating copy to clipboard operation
rss-bridge copied to clipboard

[RedditBridge] Error 0: Call to a member function getBody() on array [L154]

Open ajain-93 opened this issue 1 year ago • 1 comments

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:

  1. Go to 'RedditBridge'
  2. Select any bridge type
  3. Click on 'Generate Feed'
  4. See error

Screenshots image

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);

ajain-93 avatar Sep 03 '24 06:09 ajain-93

Unclear to me why this happens but I think it's an old cache value.

Clearing cache will probably fix it.

dvikan avatar Sep 03 '24 09:09 dvikan