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

Cannot use object of type stdClass as array in InjectionResponseParser class #10

Open
tadas-enigma opened this issue Mar 10, 2022 · 1 comment

Comments

@tadas-enigma
Copy link

Hey,

I have encountered error in InjectionResponseParser class.

Uncaught Error: Cannot use object of type stdClass as array in vendor/socketlabs/emaildelivery/InjectionApi/src/Core/InjectionResponseParser.php:27

I think ErrorCode should be taken by array because $injectionResponse comes from json_decode function in 18th line.

$errorCode = $injectionResponse->MessageResults[0]['ErrorCode'];

@frelle
Copy link

frelle commented Nov 7, 2022

Hi,
I have the same error, did you find a way to fix that ? (for now, I just removed the [0] part, and it's working)
thanks

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

No branches or pull requests

2 participants