Skip to content

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

@TristanPouliquen

Description

@TristanPouliquen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions