- fixed strlen() to mb_strlen();

This commit is contained in:
Nikita Sinelnikov
2021-09-21 16:20:37 +03:00
parent e8c1497ec4
commit 7aa8efefff
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
* @return string
*/
function um_trim_string( $s, $length = 20 ) {
$s = strlen( $s ) > $length ? substr( $s, 0, $length ) . "..." : $s;
$s = mb_strlen( $s ) > $length ? substr( $s, 0, $length ) . "..." : $s;
return $s;
}