diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-04-05 22:26:38 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-04-18 17:35:09 +0200 |
commit | de70df00314b6b0d3fe0383ed49b98183652a8a4 (patch) | |
tree | 8f077e4779d2f7d4d74d0f93219d34d8bdab4f79 /apps/dav/lib | |
parent | fa65aaf1fc8836e1a0e5ee1ffe38ee032a487892 (diff) | |
download | nextcloud-server-de70df00314b6b0d3fe0383ed49b98183652a8a4.tar.gz nextcloud-server-de70df00314b6b0d3fe0383ed49b98183652a8a4.zip |
Use multibyte substring
Fixes #7661
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 4 |
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)); |