codeception-email-mailhog
codeception-email-mailhog copied to clipboard
accessInboxFor - swapped parameters for array search
Hello.
When I am trying to access inbox with function accessInboxFor($inbox) error appears:
array_search() expects parameter 2 to be array, string given
It's caused by swapped parametres for array search:
array_search($email->Content->Headers->Cc[0], $addressPlusDelimiters)
Should be:
array_search($addressPlusDelimiters, $email->Content->Headers->Cc[0])
I haven't used this code in quite a while (and only on a tiny pet project).
You're right that the needle and haystack are inverted, but that being said, shouldn't it be the entire Cc array that should be passed as a haystack?
Yes. My bad. You're right.