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

Fix: Check if is_numeric before casting #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Traineau
Copy link

@Traineau Traineau commented Mar 14, 2024

Specific keys like languageSkillCode are parsed as a INT, even though it is supposed to be a string (ISO CODE like "FR", "EN" etc...).

The problem resulting is that every languageSkillCode are casted to int because of the /Code$/i regex, and so the parseElement returns "0" every time.

To avoid this we can check if the value is numeric in addition to the /Code$/i regex.

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