mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #8922 from lhalaa/pulls/dbtext-multibyte
FIX Replace substr with mb_substr to get the correct position
This commit is contained in:
commit
be9f0120ad
@ -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…
x
Reference in New Issue
Block a user