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

API response error: Warning: Undefined array key "MessageEvents" #149

Open
TristanPouliquen opened this issue Jan 29, 2025 · 0 comments · May be fixed by #151
Open

API response error: Warning: Undefined array key "MessageEvents" #149

TristanPouliquen opened this issue Jan 29, 2025 · 0 comments · May be fixed by #151

Comments

@TristanPouliquen
Copy link
Contributor

Hello,

We've seen some occurrences of an error handling your API response from your repo.

We're calling PostmarkClient->getOutboundMessageDetails and we are seeing errors popping up with the message Warning: Undefined array key "MessageEvents" .

I see in the constructor of PostmarkOubdoundMessageDetail that you have a check on whether the array key MessageEvents is empty or not.

If the check is true, you instantiate a PostmarkMessageEvents with no arguments, which results in an empty array being passed as a default value but in the constructor of this class, you do not check whether the key MessageEvents is there before iterating on it.

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