1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Updated string functions to use mulitbyte versions where needed

Fixes #816
This commit is contained in:
Dan Brown
2019-05-25 16:14:57 +01:00
parent 78f5f44460
commit 13c0386e84
8 changed files with 14 additions and 14 deletions

View File

@ -56,7 +56,7 @@ class Chapter extends Entity
public function getExcerpt(int $length = 100)
{
$description = $this->text ?? $this->description;
return strlen($description) > $length ? substr($description, 0, $length-3) . '...' : $description;
return mb_strlen($description) > $length ? mb_substr($description, 0, $length-3) . '...' : $description;
}
/**