Skip to content

Commit

Permalink
check return on both iconv calls
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.php.net/repository/pear/packages/Mail_Mime/trunk@317689 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
roojs committed Oct 3, 2011
1 parent 2a3a0a5 commit 8238123
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mimeDecode.php
Expand Up @@ -758,7 +758,8 @@ function _decodeHeader($input, $default_charset=false)
break; break;
} }
if (is_string($this->_decode_headers)) { if (is_string($this->_decode_headers)) {
$text = @iconv($charset, $this->_decode_headers, $text); $conv = @iconv($charset, $this->_decode_headers, $text);
$text = ($conv === false) ? $text : $conv;
} }
$input = str_replace($encoded, $text, $input); $input = str_replace($encoded, $text, $input);
} }
Expand Down

0 comments on commit 8238123

Please sign in to comment.