Remove mbstring_binary_safe_strlen(). Use mbstring_binary_safe_encoding() and reset_mbstring_encoding() directly.

fixes #28162.

git-svn-id: https://develop.svn.wordpress.org/trunk@28808 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2014-06-23 22:20:23 +00:00
parent 0adec3db8a
commit 2120ede170
3 changed files with 19 additions and 23 deletions
-18
View File
@@ -4404,24 +4404,6 @@ function reset_mbstring_encoding() {
mbstring_binary_safe_encoding( true );
}
/**
* Uses a binary-safe encoding to get the length of a string in bytes if func_overload is enabled.
*
* @see mbstring_binary_safe_encoding()
*
* @since 4.0.0
*
* @param string $string The string to get the length of.
* @return int The length of the string in bytes.
*/
function mbstring_binary_safe_strlen( $string ) {
mbstring_binary_safe_encoding();
$length = strlen( $string );
reset_mbstring_encoding();
return $length;
}
/**
* Alternative to filter_var( $var, FILTER_VALIDATE_BOOLEAN )
*