Correctly trim long cyrillic note
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
b485099115
commit
656f4fd839
|
@ -2464,11 +2464,10 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
||||||
if ($this->db->supports4ByteText()) {
|
if ($this->db->supports4ByteText()) {
|
||||||
$value = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $value);
|
$value = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $value);
|
||||||
}
|
}
|
||||||
$value = mb_substr($value, 0, 254);
|
|
||||||
|
|
||||||
$query->setParameter('name', $property->name);
|
$query->setParameter('name', $property->name);
|
||||||
$query->setParameter('parameter', substr($key, 0, 254));
|
$query->setParameter('parameter', mb_substr($key, 0, 254));
|
||||||
$query->setParameter('value', substr($value, 0, 254));
|
$query->setParameter('value', mb_substr($value, 0, 254));
|
||||||
$query->execute();
|
$query->execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1055,7 +1055,7 @@ class CardDavBackend implements BackendInterface, SyncSupport {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$query->setParameter('name', $property->name);
|
$query->setParameter('name', $property->name);
|
||||||
$query->setParameter('value', substr($property->getValue(), 0, 254));
|
$query->setParameter('value', mb_substr($property->getValue(), 0, 254));
|
||||||
$query->setParameter('preferred', $preferred);
|
$query->setParameter('preferred', $preferred);
|
||||||
$query->execute();
|
$query->execute();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue