summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-01-13 12:59:21 +0000
committeralecpl <alec@alec.pl>2010-01-13 12:59:21 +0000
commitecbd5b5d53a9d9d8d24c84dcf2ebf7682f77107d (patch)
tree957da7f8a25b140d5edb433879c12ffdd73a8622 /program/include
parent18cdf6b15547f85b7ff369a5777451f40b149ea0 (diff)
- prevent from PHP error when iconv doesn't support //IGNORE (#1486375)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/main.inc2
-rw-r--r--program/include/rcube_shared.inc2
2 files changed, 2 insertions, 2 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 6b738e37a..36d39085d 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -195,7 +195,7 @@ function rcube_charset_convert($str, $from, $to=NULL)
// convert charset using iconv module
if (function_exists('iconv') && $from != 'UTF-7' && $to != 'UTF-7') {
- $_iconv = iconv($from, $to . '//IGNORE', $str);
+ $_iconv = @iconv($from, $to . '//IGNORE', $str);
if ($_iconv !== false) {
return $_iconv;
}
diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index b3d9a179a..bfd6740db 100644
--- a/program/include/rcube_shared.inc
+++ b/program/include/rcube_shared.inc
@@ -518,7 +518,7 @@ function rc_utf8_clean($input)
if (function_exists('mb_convert_encoding') && ($res = mb_convert_encoding($input, 'UTF-8', 'UTF-8')) !== false)
return $res;
- if (function_exists('iconv') && ($res = iconv('UTF-8', 'UTF-8//IGNORE', $input)) !== false)
+ if (function_exists('iconv') && ($res = @iconv('UTF-8', 'UTF-8//IGNORE', $input)) !== false)
return $res;
$regexp = '/^('.