Skip to content

#41 Make sure region value is always string #61

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

pikulsky
Copy link

The "region" field in "vipps_customer_address" table is defined (see db_schema.xml) as nullable field. Same time loaded from database the region value is returned by getRegion() function and result is used then in string-related functions (like, preg_replace(), strcasecmp()) where argument type is specified as string and null value causes TypeError like this: TypeError: strcasecmp(): Argument #1 ($string1) must be of type string, null given in [...] vendor/vipps/module-login/Model/VippsAddressManagement.php:385

The "region" field in "vipps_customer_address" table is defined (see db_schema.xml) as nullable field.
Same time loaded from database the region value is returned by getRegion() function and result is used then in string-related functions (like, preg_replace(), strcasecmp()) where argument type is specified as string and null value causes TypeError like this: TypeError: strcasecmp(): Argument #1 ($string1) must be of type string, null given in [...] vendor/vipps/module-login/Model/VippsAddressManagement.php:385
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