Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make sure the encoding is on mbstring's list of supported encodings b…

…efore trying to convert.

Thanks to mattfaulds on GitHub, and solarissmoke on WordPress Trac for patches.
  • Loading branch information...
commit cce56bb6809de9301909204c40c8a4f13ec322fe 1 parent 174fd6c
Ryan McCue rmccue authored
Showing with 1 addition and 1 deletion.
  1. +1 −1 
2 
@@ -9461,7 +9461,7 @@ class SimplePie_Misc
return SimplePie_Misc::windows_1252_to_utf8($data);
// This is second, as behaviour of this varies only with PHP version (the middle part of this expression checks the encoding is supported).
- elseif (function_exists('mb_convert_encoding') && @mb_convert_encoding("\x80", 'UTF-16BE', $input) !== "\x00\x80" && ($return = @mb_convert_encoding($data, $output, $input)))
+ 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)))
return $return;
Please sign in to comment.
Something went wrong with that request. Please try again.