From: Anatol Belski Date: Mon, 15 Sep 2014 08:51:56 +0000 (+0200) Subject: fix condition X-Git-Tag: PRE_NATIVE_TLS_MERGE~158^2~85^2~28^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=140d99b467e5bfd62ac9f1ee09b75cf6f7f0393d;p=php fix condition --- 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);