Skip to content

Commit b5d7564

Browse files
committed
Add compat for mb_substr rather than mb_strcut. fixes WordPress#9055
git-svn-id: https://develop.svn.wordpress.org/trunk@10707 602fd350-edb4-49c9-b593-d223f7449a82
1 parent e38f8c8 commit b5d7564

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

wp-includes/compat.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ function hash_hmac($algo, $data, $key, $raw_output = false) {
7777
}
7878
endif;
7979

80-
if ( ! function_exists('mb_strcut') ):
81-
function mb_strcut( $str, $start, $length=null, $encoding=null ) {
82-
return _mb_strcut($str, $start, $length, $encoding);
80+
if ( ! function_exists('mb_substr') ):
81+
function mb_substr( $str, $start, $length=null, $encoding=null ) {
82+
return _mb_substr($str, $start, $length, $encoding);
8383
}
8484
endif;
8585

86-
function _mb_strcut( $str, $start, $length=null, $encoding=null ) {
86+
function _mb_substr( $str, $start, $length=null, $encoding=null ) {
8787
// the solution below, works only for utf-8, so in case of a different
8888
// charset, just use built-in substr
8989
$charset = get_option( 'blog_charset' );

0 commit comments

Comments
 (0)