Skip to content

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

Open
@ajain-93

Description

@ajain-93

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug-ReportConfirmed bug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions