- Don't log errors when charset conversion fails

release-0.6
alecpl 14 years ago
parent cc90ed1f84
commit 3ddca3b945

@ -142,10 +142,8 @@ function rcmail_temp_gc()
$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;
@ -205,7 +203,6 @@ function rcube_charset_convert($str, $from, $to=NULL)
static $iconv_options = null;
static $mbstring_loaded = null;
static $mbstring_list = null;
static $convert_warning = false;
static $conv = null;
$error = false;
@ -310,19 +307,6 @@ function rcube_charset_convert($str, $from, $to=NULL)
$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
return $str;
}

Loading…
Cancel
Save