Remove mbstring_binary_safe_strlen(). Use mbstring_binary_safe_encoding() and reset_mbstring_encoding() directly.
fixes #28162. Built from https://develop.svn.wordpress.org/trunk@28808 git-svn-id: http://core.svn.wordpress.org/trunk@28617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -481,7 +481,9 @@ function shortcode_unautop( $pee ) {
|
||||
* @return bool True if $str fits a UTF-8 model, false otherwise.
|
||||
*/
|
||||
function seems_utf8($str) {
|
||||
$length = mbstring_binary_safe_strlen($str);
|
||||
mbstring_binary_safe_encoding();
|
||||
$length = strlen($str);
|
||||
reset_mbstring_encoding();
|
||||
for ($i=0; $i < $length; $i++) {
|
||||
$c = ord($str[$i]);
|
||||
if ($c < 0x80) $n = 0; # 0bbbbbbb
|
||||
@@ -705,7 +707,10 @@ function utf8_uri_encode( $utf8_string, $length = 0 ) {
|
||||
$num_octets = 1;
|
||||
$unicode_length = 0;
|
||||
|
||||
$string_length = mbstring_binary_safe_strlen( $utf8_string );
|
||||
mbstring_binary_safe_encoding();
|
||||
$string_length = strlen( $utf8_string );
|
||||
reset_mbstring_encoding();
|
||||
|
||||
for ($i = 0; $i < $string_length; $i++ ) {
|
||||
|
||||
$value = ord( $utf8_string[ $i ] );
|
||||
|
||||
Reference in New Issue
Block a user