From 74556e546aeee7e858660f581b97517c17e5e4de Mon Sep 17 00:00:00 2001 From: Andrea Ruggiero Date: Fri, 20 Dec 2019 10:05:18 +0100 Subject: [PATCH] Ignore @iconv notice messages --- src/MbWrapper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MbWrapper.php b/src/MbWrapper.php index 3c7cea6..cf20041 100644 --- a/src/MbWrapper.php +++ b/src/MbWrapper.php @@ -345,14 +345,14 @@ public function convert($str, $fromCharset, $toCharset) if ($str !== '') { if ($from !== false && $to === false) { $str = mb_convert_encoding($str, 'UTF-8', $from); - return iconv('UTF-8', $this->getIconvAlias($toCharset) . '//TRANSLIT//IGNORE', $str); + return @iconv('UTF-8', $this->getIconvAlias($toCharset) . '//TRANSLIT//IGNORE', $str); } elseif ($from === false && $to !== false) { - $str = iconv($this->getIconvAlias($fromCharset), 'UTF-8//TRANSLIT//IGNORE', $str); + $str = @iconv($this->getIconvAlias($fromCharset), 'UTF-8//TRANSLIT//IGNORE', $str); return mb_convert_encoding($str, $to, 'UTF-8'); } elseif ($from !== false && $to !== false) { return mb_convert_encoding($str, $to, $from); } - return iconv( + return @iconv( $this->getIconvAlias($fromCharset), $this->getIconvAlias($toCharset) . '//TRANSLIT//IGNORE', $str