This fixes creation when array is not sorted
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 1 Feb 2010 20:30:44 +0000 (13:30 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 1 Feb 2010 20:30:44 +0000 (13:30 -0700)
framework/Imap_Client/lib/Horde/Imap/Client/Utils.php

index 83907bf..78548d6 100644 (file)
@@ -78,7 +78,7 @@ class Horde_Imap_Client_Utils
                     }
                 } else {
                     $out[] = $first . ':' . $last;
-                    if ($last != $val) {
+                    if (($i == $key) && ($last != $val)) {
                         $out[] = $val;
                     }
                 }