Make WordPress Core


Ignore:
Timestamp:
06/23/2014 02:47:08 PM (11 years ago)
Author:
SergeyBiryukov
Message:

Introduce a binary-safe wrapper for strlen() and use it in seems_utf8(), utf8_uri_encode(), and wp_read_image_metadata().

Use binary-safe POMO_Reader::strlen() in MO::export_to_file_handle().

fixes #28162.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r28802 r28806  
    482482 */
    483483function seems_utf8($str) {
    484     $length = strlen($str);
     484    $length = mbstring_binary_safe_strlen($str);
    485485    for ($i=0; $i < $length; $i++) {
    486486        $c = ord($str[$i]);
     
    706706    $unicode_length = 0;
    707707
    708     $string_length = strlen( $utf8_string );
     708    $string_length = mbstring_binary_safe_strlen( $utf8_string );
    709709    for ($i = 0; $i < $string_length; $i++ ) {
    710710
Note: See TracChangeset for help on using the changeset viewer.