Hey all, just wondering if this could be a bug. If so, i'll add it to the tracker, else i'll fix my plugin. I got a report that my listcommands plugin starts throwing errors in 0.9 because in message_headers_output $p['headers']->others[$key] ends up being an array instead of a string. This is weird, because in the example sent to me, I see the following:
List-Post: mailto:users@foo.bar
But when you var_dump the data in the hook you see:
"list-post"]=> array(2) { [0]=> string(22) "mailto:users@foo.bar" [1]=> string(22) "mailto:users@foo.bar" }
My guess is that this may be because RC itself now asks for LIST-POST header, and my plugin adds that to the requested header set in imap_init. Now I can remove that, but I think RC shouldnt fetch the same content twice and add a duplicate to the header array. Or is this intended behavior?
Regards,
Cor
On 04/01/2013 08:26 AM, Cor Bosman wrote:
My guess is that this may be because RC itself now asks for LIST-POST header, and my plugin adds that to the requested header set in imap_init. Now I can remove that, but I think RC shouldnt fetch the same content twice and add a duplicate to the header array. Or is this intended behavior?
Looks like we should check uniqueness of request headers in rcube_imap_generic::fetchHeaders(). However, your code should still be aware of possibility to get an array in case if malformed message with duplicated header. Please, open a ticket.