com php-src: fix condition: ext/iconv/iconv.c
| From: | Anatol Belski | Date: | Mon, 15 Sep 2014 09:30:22 +0000 |
| Subject: | com php-src: fix condition: ext/iconv/iconv.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81631@lists.php.net to get a copy of this message | ||
Commit: 140d99b467e5bfd62ac9f1ee09b75cf6f7f0393d
Author: Anatol Belski <ab@php.net> Mon, 15 Sep 2014 10:51:56 +0200
Parents: a74239330570fbd8ba07d93ef37bd594efe0c0e4
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=140d99b467e5bfd62ac9f1ee09b75cf6f7f0393d
Log:
fix condition
Changed paths:
M ext/iconv/iconv.c
Diff:
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 1803266..d27270e 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);