diff options
Diffstat (limited to 'ext/iconv/iconv.c')
-rw-r--r-- | ext/iconv/iconv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index bd21ede5ac..d80bac77f3 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -1536,7 +1536,11 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st default: /* first letter of a non-encoded word */ err = _php_iconv_appendc(pretval, *p1, cd_pl); if (err != PHP_ICONV_ERR_SUCCESS) { - goto out; + if (mode & PHP_ICONV_MIME_DECODE_CONTINUE_ON_ERROR) { + err = PHP_ICONV_ERR_SUCCESS; + } else { + goto out; + } } encoded_word = NULL; if ((mode & PHP_ICONV_MIME_DECODE_STRICT)) { |