mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Replace substr with mb_substr to get the correct position
This commit is contained in:
parent
f2f28586d9
commit
63360f8048
@ -206,8 +206,8 @@ class DBText extends DBString
|
||||
if ($position > 0) {
|
||||
// We don't want to start mid-word
|
||||
$position = max(
|
||||
(int) mb_strrpos(substr($text, 0, $position), ' '),
|
||||
(int) mb_strrpos(substr($text, 0, $position), "\n")
|
||||
(int) mb_strrpos(mb_substr($text, 0, $position), ' '),
|
||||
(int) mb_strrpos(mb_substr($text, 0, $position), "\n")
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user