summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_imap.php
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-05-22 18:02:13 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-05-22 18:02:13 +0200
commitb38f83bb27a8630adbfc27a2dcbd31e01bff44e2 (patch)
tree273dbecaa36db6be0f0fed5639386690a47ef832 /program/lib/Roundcube/rcube_imap.php
parent14291c79dbc1a6ad77a5d43b28e4f3a49f3df46c (diff)
parent899e070f8ebeef037500583666ee9610f335b12a (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/lib/Roundcube/rcube_imap.php')
-rw-r--r--program/lib/Roundcube/rcube_imap.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php
index 4b32c466b..bf588cacf 100644
--- a/program/lib/Roundcube/rcube_imap.php
+++ b/program/lib/Roundcube/rcube_imap.php
@@ -1691,12 +1691,15 @@ class rcube_imap extends rcube_storage
$string_offset = $m[1] + strlen($m[0]) + 4; // {}\r\n
$string = substr($str, $string_offset - 1, $m[0]);
$string = rcube_charset::convert($string, $charset, $dest_charset);
- if ($string === false) {
+
+ if ($string === false || !strlen($string)) {
continue;
}
+
$res .= substr($str, $last, $m[1] - $last - 1) . rcube_imap_generic::escape($string);
$last = $m[0] + $string_offset - 1;
}
+
if ($last < strlen($str)) {
$res .= substr($str, $last, strlen($str)-$last);
}