elkarte / Elkarte

ElkArte Forum. A free, open source, modern discussion forum / BB
https://elkarte.github.io/Elkarte/
BSD 3-Clause "New" or "Revised" License
175 stars 61 forks source link

Error sending PM to multi recipents #3713

Closed Spuds closed 5 months ago

Spuds commented 1 year ago

"array_combine(): Both parameters should have an equal number of elements"

emanuele45 commented 9 months ago

Looking at the code I'd say it should be either in: https://github.com/elkarte/Elkarte/blob/4b5853c17da2fe097cd58c38742d4bd321ce32ac/sources/subs/PersonalMessage.subs.php#L852 or: https://github.com/elkarte/Elkarte/blob/4b5853c17da2fe097cd58c38742d4bd321ce32ac/sources/subs/PersonalMessage.subs.php#L903 the first should not be because the number of elements are the same, the second could happen if $all_to was empty, but it cannot be because it's checked a few lines above for emptiness... I guess this is not the correct spot. We don't have a traceback in the logs, right? 👼

Spuds commented 9 months ago

I don't have a log for this one, I was just noting the issue occurred to me but never grabbed the log but easy enough to reproduce. Its been a long time, but I seem to recall the message was sent to all.

Spuds commented 5 months ago

Finally decided to look at this and the error was thrown in function log_email($sent) and was due to the way the time and email were being appended to the array .. so you needed to have PBE on and be sending to multiple recipients that had email enabled. Simple fix, long time to trace 👊 🤕