From 140d99b467e5bfd62ac9f1ee09b75cf6f7f0393d Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 15 Sep 2014 10:51:56 +0200 Subject: [PATCH] fix condition --- ext/iconv/iconv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 1803266c33..d27270ece9 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -2076,7 +2076,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 TSRMLS_CC); - if (err == PHP_ICONV_ERR_SUCCESS && str->val != NULL && retval.s != NULL) { + if (err == PHP_ICONV_ERR_SUCCESS && str->val[0] != '\0' && retval.s != NULL) { RETURN_STR(retval.s); } smart_str_free(&retval); -- 2.50.1