Roundcube Community Forum

 

Bug in reply identity selection in 0.9.3

Started by oviksna, August 26, 2013, 09:02:26 AM

Previous topic - Next topic

oviksna

Hello,

Upgraded from 0.8.5 to 0.9.3 and found bug in reply identity selection. Now when I press reply, always first (default) identity is selected by default. Previous version selected identity, message was received to. Did debugging and found problem and solution.

Problem. PHP's in_array function in html select class is used with third option (strict) set to true. When adding select options, identity id is left unchanged, but when checking for default value, there is cast to int type.

Solution. File program/steps/mail/compose.inc, line 485. Add cast to int type here as well, like this
$select_from->add(format_email_recipient($sql_arr['email'], $sql_arr['name']), (int)$identity_id);

Thanks,
Oskars

JohnDoh

Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...