summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-04-18 19:15:50 +0200
committerGitHub <noreply@github.com>2018-04-18 19:15:50 +0200
commit89c77c3073f74c12799b53983a8902c20676913a (patch)
tree8f077e4779d2f7d4d74d0f93219d34d8bdab4f79
parentfa65aaf1fc8836e1a0e5ee1ffe38ee032a487892 (diff)
parentde70df00314b6b0d3fe0383ed49b98183652a8a4 (diff)
downloadnextcloud-server-89c77c3073f74c12799b53983a8902c20676913a.tar.gz
nextcloud-server-89c77c3073f74c12799b53983a8902c20676913a.zip
Merge pull request #9234 from nextcloud/13-7661
[stable13] Use multibyte substring
-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 169bf6ff6a5..b6502a2616f 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -2253,7 +2253,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);
@@ -2271,7 +2271,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));