Commit b5f88c2c authored by mikeytown2's avatar mikeytown2

Issue #2487021 by mikeytown2: Prevent a character encoding error from appearing.

parent 78bc6ad5
......@@ -2805,10 +2805,18 @@ function httprl_pr($input) {
$output = print_r($data, TRUE);
// Remove non UTF-8 Characters.
$encoded = FALSE;
if (function_exists('mb_convert_encoding')) {
$translated = mb_convert_encoding($output, 'UTF-8', 'auto');
$track_errors = ini_set('track_errors', '1');
$php_errormsg = '';
$translated = @mb_convert_encoding($output, 'UTF-8', 'auto');
if (empty($php_errormsg)) {
$encoded = TRUE;
}
$php_errormsg = '';
ini_set('track_errors', $track_errors);
}
else {
if (!$encoded) {
$translated = @iconv('utf-8', 'utf-8//TRANSLIT//IGNORE', $output);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment