mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
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:
@@ -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 )
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user