summaryrefslogtreecommitdiff
path: root/lib/kolab_sync_data_email.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-01-03 07:58:14 (GMT)
committerAleksander Machniak <alec@alec.pl>2013-01-03 07:58:14 (GMT)
commit30e5b34a7858549d68a8a64a7e7a974fa9af6357 (patch)
tree6b7ef104538bf81cd6d4cd80fca38bf1a1461799 /lib/kolab_sync_data_email.php
parentfadb03b9aaa3a0fa5938657403c0178af6e71d0e (diff)
downloadkolab-syncroton-30e5b34a7858549d68a8a64a7e7a974fa9af6357.tar.gz
Make body truncation multibyte aware (Bug #1390)
Diffstat (limited to 'lib/kolab_sync_data_email.php')
-rw-r--r--lib/kolab_sync_data_email.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kolab_sync_data_email.php b/lib/kolab_sync_data_email.php
index a7a468a..769d472 100644
--- a/lib/kolab_sync_data_email.php
+++ b/lib/kolab_sync_data_email.php
@@ -273,8 +273,8 @@ class kolab_sync_data_email extends kolab_sync_data implements Syncroton_Data_ID
if ($truncateAt !== null) {
if ($body_length > $truncateAt) {
- $messageBody = substr($messageBody, 0, $truncateAt);
- $body_length = $truncateAt;
+ $messageBody = mb_strcut($messageBody, 0, $truncateAt);
+ $body_length = strlen($truncateAt);
}
$isTruncacted = 1;
}