com php-src: Remove useless error check for bin2hex(): ext/standard/string.c
| From: | Nikita Popov | Date: | Fri, 16 Aug 2019 21:53:53 +0000 |
| Subject: | com php-src: Remove useless error check for bin2hex(): ext/standard/string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-107951@lists.php.net to get a copy of this message | ||
Commit: 2505edb40d951d8dc312346fba9dfa965997b250
Author: George Peter Banyard <girgias@php.net> Fri, 16 Aug 2019 22:44:21 +0200
Committer: Nikita Popov <nikita.ppv@gmail.com> Fri, 16 Aug 2019 23:53:53 +0200
Parents: b78347ba355ccd0d202dc260eadbfc37b573fcbb
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2505edb40d951d8dc312346fba9dfa965997b250
Log:
Remove useless error check for bin2hex()
And change prototype accordingly...
Closes GH-4550.
Changed paths:
M ext/standard/string.c
Diff:
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 2928cd9..c2f29ba 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -223,7 +223,7 @@ PHP_MSHUTDOWN_FUNCTION(localeconv)
/* }}} */
#endif
-/* {{{ proto string|false bin2hex(string data)
+/* {{{ proto string bin2hex(string data)
Converts the binary representation of data to hex */
PHP_FUNCTION(bin2hex)
{
@@ -236,10 +236,6 @@ PHP_FUNCTION(bin2hex)
result = php_bin2hex((unsigned char *)ZSTR_VAL(data), ZSTR_LEN(data));
- if (!result) {
- RETURN_FALSE;
- }
-
RETURN_STR(result);
}
/* }}} */