Skip to content

Update gump.class.php to fix type of field error as integer #356

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sel-1
Copy link

@sel-1 sel-1 commented Apr 17, 2025

The change is needed because the validation of the if-s are based on integer values and not string. As $input['field']['error'] is passed as string, all the if are failing.

The change is needed because the validation of the if-s are based on integer values and not string.  As $input['field']['error'] is passed as string, all the if are failing.
@sel-1
Copy link
Author

sel-1 commented Apr 17, 2025

'is_string($input[$field]['error'])' is better than 'gettype($input[$field]['error']) == 'string''

@filisko
Copy link
Collaborator

filisko commented Apr 20, 2025

@sel-1 add the unit test then

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