Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some assertions #7

Open
jj5 opened this issue Apr 8, 2023 · 0 comments
Open

Remove some assertions #7

jj5 opened this issue Apr 8, 2023 · 0 comments

Comments

@jj5
Copy link
Owner

jj5 commented Apr 8, 2023

You will find some code like this:

      assert( is_string( $result ) || $result === false );

      if ( is_string( $result ) || $result === false ) {

        return $result;

      }

      return $this->error( __FUNCTION__, KICKASS_CRYPTO_ERROR_RESULT_INVALID );

The problem is we can't test the error case because the assertion blows up. So remove all such assertions.

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

No branches or pull requests

1 participant