summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-04-05 22:26:38 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-04-05 22:26:38 +0200
commit0864d1c51de5d512b35fb2ebda5a792ba427f3f2 (patch)
treec17dbf9d01764fadab74f365bc18d100a25ca2a8 /apps
parentfeef3cbba03c4517b25a60820e8c4534b0a02b67 (diff)
downloadnextcloud-server-0864d1c51de5d512b35fb2ebda5a792ba427f3f2.tar.gz
nextcloud-server-0864d1c51de5d512b35fb2ebda5a792ba427f3f2.zip
Use multibyte substring
Fixes #7661 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index 290d6027006..b28c8534aaa 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -2251,7 +2251,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
if (!$this->db->supports4ByteText()) {
$value = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $value);
}
- $value = substr($value, 0, 254);
+ $value = mb_substr($value, 0, 254);
$query->setParameter('name', $property->name);
$query->setParameter('parameter', null);
@@ -2269,7 +2269,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
if ($this->db->supports4ByteText()) {
$value = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $value);
}
- $value = substr($value, 0, 254);
+ $value = mb_substr($value, 0, 254);
$query->setParameter('name', $property->name);
$query->setParameter('parameter', substr($key, 0, 254));