Skip to content

Conversation

@szymekjanaczek
Copy link
Contributor

@szymekjanaczek szymekjanaczek commented Apr 20, 2022

Fixed #224, #98.

Hello @Webklex!
I've recently got stuck on a problem with the "illegal offset" error while using your package. After debugging and lots of tests performed on real mailboxes, I realized that we have to remove not-message entries from the results array - because these rows don't have a UID field. The array_search can return false or -1 when can't find searched value.
In our case, the array_search returns -1 or (mainly) false as output, and then, the script was trying to add 1 to the result. In PHP false + 1 = 1.

So when the algorithm hadn't been able to find the UID value it thought, that the proper index is 1 (as a result of the false + 1 calculation), which was causing the error.

@szymekjanaczek
Copy link
Contributor Author

@Webklex, are you there? Should I change anything?

@szymekjanaczek
Copy link
Contributor Author

@Webklex, bump again

@Webklex
Copy link
Owner

Webklex commented Aug 24, 2022

Hi @szymekjanaczek ,
many thanks for your pull request! Im sorry you had to wait so long.

Best regards,

@Webklex Webklex merged commit 8a52237 into Webklex:master Aug 24, 2022
@szymekjanaczek
Copy link
Contributor Author

szymekjanaczek commented Aug 24, 2022

@Webklex no problem - glad to hear that!
So looking forward to release ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants