Author Topic: Bug in reply identity selection in 0.9.3  (Read 2338 times)

Offline oviksna

  • Newbie
  • *
  • Posts: 1
Bug in reply identity selection in 0.9.3
« on: August 26, 2013, 09:02:26 AM »
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

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,850
Re: Bug in reply identity selection in 0.9.3
« Reply #1 on: August 26, 2013, 09:42:41 AM »
I think this has already been fixed. See http://trac.roundcube.net/ticket/1489291
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦