WordPress.org

Make WordPress Core

Ticket #10498: 10498.diff

File 10498.diff, 871 bytes (added by solarissmoke, 3 years ago)
  • wp-includes/class-simplepie.php

     
    94329432                        return SimplePie_Misc::windows_1252_to_utf8($data); 
    94339433                } 
    94349434                // This is second, as behaviour of this varies only with PHP version (the middle part of this expression checks the encoding is supported). 
    9435                 elseif (function_exists('mb_convert_encoding') && @mb_convert_encoding("\x80", 'UTF-16BE', $input) !== "\x00\x80" && ($return = @mb_convert_encoding($data, $output, $input))) 
     9435                elseif (function_exists('mb_convert_encoding') && @mb_convert_encoding("\x80", 'UTF-16BE', $input) !== "\x00\x80" && in_array( $input, mb_list_encodings() ) && ($return = @mb_convert_encoding($data, $output, $input))) 
    94369436                { 
    94379437                        return $return; 
    94389438                }