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

[error] PHP Fatal error: Cannot use object of type stdClass as array #196

Closed
aaronpk opened this issue Aug 23, 2018 · 1 comment · Fixed by #197
Closed

[error] PHP Fatal error: Cannot use object of type stdClass as array #196

aaronpk opened this issue Aug 23, 2018 · 1 comment · Fixed by #197
Milestone

Comments

@aaronpk
Copy link
Member

aaronpk commented Aug 23, 2018

PHP Fatal error:  Cannot use object of type stdClass as array in vendor/mf2/mf2/Mf2/Parser.php on line 1412

encountered while parsing this URL: https://www.eatthispodcast.com/our-daily-bread-22/

@aaronpk
Copy link
Member Author

aaronpk commented Aug 23, 2018

Changing this line to the below fixes it. This is caused by there being no properties on an object at all, so checking for the existence of url crashes since properties is an object in this case.

$prefixSpecificResult['value'] = (!is_array($result['properties']) || empty($result['properties']['url'])) ? $this->parseU($node) : reset($result['properties']['url']);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant