Use multibyte substring
Fixes #7661 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
fa65aaf1fc
commit
de70df0031
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue