[Tickets #9102] Dovecot folders subscription
bugs at horde.org
bugs at horde.org
Fri Jun 18 04:53:59 UTC 2010
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/9102
------------------------------------------------------------------------------
Ticket | 9102
Created By | leandro.damascena at gmail.com
Summary | Dovecot folders subscription
Queue | IMP
Version | Git master
Type | Bug
State | Unconfirmed
Priority | 2. Medium
Milestone |
Patch | 1
Owners |
+New Attachment | inbox_subs.diff
------------------------------------------------------------------------------
leandro.damascena at gmail.com (2010-06-18 00:53) wrote:
Dovecot by default doesn't use subscription for INBOX (at least in my
mailserver) and this produces a error in IMAP Tree Folders... Looking
at the source code I could find an error when the INBOX is
unsubscribed...
protected function _getList($showunsub) in imp/lib/Imap/Tree.php...
This function tests if result list doesn't contain INBOX and FORCE an
array to increment INBOX, however, this function use array_merge and
it produces an error when some folder has a numeric name (in my case
my folder is: 2009 or 2010)...
Looking at PHP documentation I saw
(http://php.net/manual/en/function.array-merge.php):
If all of the arrays contain only numeric keys, the resulting array is
given incrementing keys starting from zero.
If you want to append array elements from the second array to the
first array while not overwriting the elements from the first array
and not re-indexing, use the + array union operator:
<?php
$array1 = array(0 => 'zero_a', 2 => 'two_a', 3 => 'three_a');
$array2 = array(1 => 'one_b', 3 => 'three_b', 4 => 'four_b');
$result = $array1 + $array2;
var_dump($result);
?>
More information about the bugs
mailing list