Skip to content

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Aug 16, 2019

From my testing of trying to get a return value of false this check seems unnecessary as result is always a zend_string generated from php_bin2hex() [1]

Moreover, if the input argument can't be converted to a string ZPP takes care of throwing a TypeError.

If there is indeed a case where FALSE can be returned a test should be created to cover that case.

[1] https://lxr.room11.org/xref/php-src%40master/ext/standard/string.c#116

@php-pulls php-pulls closed this in 2505edb Aug 16, 2019
@Girgias Girgias deleted the remove-useless-check-bin2hex branch August 16, 2019 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants