summaryrefslogtreecommitdiff
path: root/roundcubemail
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-10-29 12:39:12 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-10-29 12:39:12 +0000
commit6bcfeffbae25d991e5ed756fd6a1f0730b091df1 (patch)
tree26df97b99d7b644ba916a8bbcf9134c1fdd093da /roundcubemail
parent81a98f89bd2f90df6799f1c35fc12d4f55148ab1 (diff)
- Fix problem with numeric folder names (#1485527)
git-svn-id: https://svn.roundcube.net/trunk@2021 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
-rw-r--r--roundcubemail/CHANGELOG4
-rw-r--r--roundcubemail/program/include/rcube_imap.php8
-rw-r--r--roundcubemail/program/include/rcube_shared.inc2
3 files changed, 10 insertions, 4 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG
index 6c1d90e9c..cbf94dbf3 100644
--- a/roundcubemail/CHANGELOG
+++ b/roundcubemail/CHANGELOG
@@ -1,6 +1,10 @@
CHANGELOG RoundCube Webmail
---------------------------
+2008/10/29 (alec)
+----------
+- Fix problem with numeric folder names (#1485527)
+
2008/10/27 (alec)
----------
- Fix unread message unintentionally marked as read if read_when_deleted=true (#1485409)
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php
index e18c14c2e..7a8b00c1c 100644
--- a/roundcubemail/program/include/rcube_imap.php
+++ b/roundcubemail/program/include/rcube_imap.php
@@ -2669,13 +2669,15 @@ class rcube_imap
// finally we must rebuild the list to move
// subfolders of default folders to their place...
// ...also do this for the rest of folders because
- // asort() is not properly sorting case sensitive names
+ // asort() is not properly sorting case sensitive names
+
+ // set the type of folder name variable (#1485527)
while (list($key, $folder) = each($folders)) {
- $a_out[] = $folder;
+ $a_out[] = (string) $folder;
unset($folders[$key]);
foreach ($folders as $idx => $f) {
if (strpos($f, $folder.$delimiter) === 0) {
- $a_out[] = $f;
+ $a_out[] = (string) $f;
unset($folders[$idx]);
}
}
diff --git a/roundcubemail/program/include/rcube_shared.inc b/roundcubemail/program/include/rcube_shared.inc
index 26de5b45c..9f8bc4f04 100644
--- a/roundcubemail/program/include/rcube_shared.inc
+++ b/roundcubemail/program/include/rcube_shared.inc
@@ -179,7 +179,7 @@ function json_serialize($var)
return $brackets{0} . implode(',', $pairs) . $brackets{1};
}
}
- else if (is_numeric($var) && strval(intval($var)) === strval($var))
+ else if (!is_string($var) && strval(intval($var)) === strval($var))
return $var;
else if (is_bool($var))
return $var ? '1' : '0';