- Don't log errors when charset conversion fails
| | |
| | | $tmp = unslashify($rcmail->config->get('temp_dir')); |
| | | $expire = mktime() - 172800; // expire in 48 hours |
| | | |
| | | if ($dir = opendir($tmp)) |
| | | { |
| | | while (($fname = readdir($dir)) !== false) |
| | | { |
| | | if ($dir = opendir($tmp)) { |
| | | while (($fname = readdir($dir)) !== false) { |
| | | if ($fname{0} == '.') |
| | | continue; |
| | | |
| | |
| | | static $iconv_options = null; |
| | | static $mbstring_loaded = null; |
| | | static $mbstring_list = null; |
| | | static $convert_warning = false; |
| | | static $conv = null; |
| | | |
| | | $error = false; |
| | |
| | | return $_str; |
| | | } |
| | | $error = true; |
| | | } |
| | | |
| | | // report error |
| | | if ($error && !$convert_warning) { |
| | | raise_error(array( |
| | | 'code' => 500, |
| | | 'type' => 'php', |
| | | 'file' => __FILE__, |
| | | 'line' => __LINE__, |
| | | 'message' => "Could not convert string from $from to $to. Make sure iconv/mbstring is installed or lib/utf8.class is available." |
| | | ), true, false); |
| | | |
| | | $convert_warning = true; |
| | | } |
| | | |
| | | // return UTF-8 or original string |