diff options
| author | Kalle Sommer Nielsen <kalle@php.net> | 2015-06-17 09:39:45 +0200 |
|---|---|---|
| committer | Kalle Sommer Nielsen <kalle@php.net> | 2015-06-17 09:39:45 +0200 |
| commit | ff9e290438afc4c9e3d69bc88e37fd56267fe898 (patch) | |
| tree | 580f9c7d8ec62f2efd5a877eaa936c2147c3b125 | |
| parent | 3697f0221282831c846ff67054a1b03a833f50bd (diff) | |
| download | php-git-ff9e290438afc4c9e3d69bc88e37fd56267fe898.tar.gz | |
Fixed bug #69840 (iconv_substr() doesn't work with UTF-16BE)
| -rw-r--r-- | ext/iconv/iconv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 897185da8a..8fcc43dd92 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -2109,7 +2109,7 @@ PHP_FUNCTION(iconv_substr) err = _php_iconv_substr(&retval, str->val, str->len, offset, length, charset); _php_iconv_show_error(err, GENERIC_SUPERSET_NAME, charset); - if (err == PHP_ICONV_ERR_SUCCESS && str->val[0] != '\0' && retval.s != NULL) { + if (err == PHP_ICONV_ERR_SUCCESS && str->len > 0 && retval.s != NULL) { RETURN_NEW_STR(retval.s); } smart_str_free(&retval); |
