diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-05-22 20:38:28 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-05-22 20:38:28 +0200 |
commit | 081f3b7d52340125c6a68c5587ed496167332544 (patch) | |
tree | f6e2bc805aca6f80e64408b6216745b5eeda941a | |
parent | 693612d396ede5c7ed8dc36e792d0e5653ccb8de (diff) |
Bring back forcing of string type for folders list items (removed unintentionally by last commit)
-rw-r--r-- | program/lib/Roundcube/rcube_imap.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index 41d1c373f..2ff48c743 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -4168,21 +4168,23 @@ class rcube_imap extends rcube_storage return $folders; } + // force the type of folder name variable (#1485527) + $folders = array_map('strval', $folders); $specials = array_unique(array_intersect($specials, $folders)); $head = array(); - // place default folders on the top + // place default folders on top foreach ($specials as $special) { $prefix = $special . $delimiter; foreach ($folders as $idx => $folder) { if ($folder === $special) { - $head[] = (string) $special; + $head[] = $special; unset($folders[$idx]); } // put subfolders of default folders on their place... else if (strpos($folder, $prefix) === 0) { - $head[] = (string) $folder; + $head[] = $folder; unset($folders[$idx]); } } |