From: George Peter Banyard Date: Fri, 16 Aug 2019 20:44:21 +0000 (+0200) Subject: Remove useless error check for bin2hex() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2505edb40d951d8dc312346fba9dfa965997b250;p=php Remove useless error check for bin2hex() And change prototype accordingly... Closes GH-4550. --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 2928cd914e..c2f29baec7 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); } /* }}} */