Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ajain-93 opened this issue Sep 3, 2024 · 1 comment
Labels
Bug-Report Confirmed bug report

Comments

@ajain-93
Copy link
Contributor

ajain-93 commented Sep 3, 2024

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 ajain-93 added the Bug-Report Confirmed bug report label Sep 3, 2024
@dvikan
Copy link
Contributor

dvikan commented Sep 3, 2024

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

Clearing cache will probably fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug-Report Confirmed bug report
Projects
None yet
Development

No branches or pull requests

2 participants