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

Improve parameter validation #64

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

kocsismate
Copy link
Collaborator

Instead of triggering fatal errors, Error exceptions are now thrown when a parameter is invalid. Error messages are changed so that they are now in line PHP 8 conventions.

@kocsismate kocsismate mentioned this pull request Aug 1, 2022
@kocsismate kocsismate requested a review from DomBlack August 17, 2022 14:23
#if PHP_VERSION_ID >= 80000
zend_argument_error(NULL, 3, "must be a power of 2");
#else
zend_throw_error(zend_ce_error, "scrypt(): Argument #3 ($N) must be a power of 2");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces and tabs are currently mixed, so I'll fix this later as a followup PR.

@kocsismate kocsismate force-pushed the param-validation branch 2 times, most recently from 40833df to d94c5c4 Compare August 17, 2022 16:20
Instead of triggering fatal errors, Error exceptions are now thrown when a parameter is invalid. Error messages are changed so that they are now in line PHP 8 conventions.
@kocsismate kocsismate merged commit 0cd11b3 into DomBlack:master Aug 18, 2022
@kocsismate kocsismate deleted the param-validation branch August 18, 2022 07:09
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.

1 participant