Skip to content

Commit 2505edb

Browse files
Girgiasnikic
authored andcommitted
Remove useless error check for bin2hex()
And change prototype accordingly... Closes GH-4550.
1 parent b78347b commit 2505edb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ext/standard/string.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ PHP_MSHUTDOWN_FUNCTION(localeconv)
223223
/* }}} */
224224
#endif
225225

226-
/* {{{ proto string|false bin2hex(string data)
226+
/* {{{ proto string bin2hex(string data)
227227
Converts the binary representation of data to hex */
228228
PHP_FUNCTION(bin2hex)
229229
{
@@ -236,10 +236,6 @@ PHP_FUNCTION(bin2hex)
236236

237237
result = php_bin2hex((unsigned char *)ZSTR_VAL(data), ZSTR_LEN(data));
238238

239-
if (!result) {
240-
RETURN_FALSE;
241-
}
242-
243239
RETURN_STR(result);
244240
}
245241
/* }}} */

0 commit comments

Comments
 (0)