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

Exception thrown in BasePhoneNumberExtractor #3138

Open
HayderMarzouk opened this issue Oct 19, 2023 · 1 comment
Open

Exception thrown in BasePhoneNumberExtractor #3138

HayderMarzouk opened this issue Oct 19, 2023 · 1 comment

Comments

@HayderMarzouk
Copy link

HayderMarzouk commented Oct 19, 2023

Describe the bug
When trying to match some phone numbers a "Object reference not set to an instance of an object" exception is thrown.

To Reproduce
Here an example with this value: (5) 555-3932

var extractor = new BasePhoneNumberExtractor(new PhoneNumberConfiguration(SequenceOptions.None));
extractor.extract("(5) 555-3932")

Expected behavior
No exception is thrown;

Sample input/output

  • (71) 555-4444
  • (5) 555-3932
  • (71) 555-7773

Platform (please complete the following information):

  • Platform: .Net
  • Environment: [e.g. nuget package, npm package, LUIS, console app, in browser]
  • Version of package V1.8.8
@HayderMarzouk
Copy link
Author

Update :
After debugging, the issue is in the following line:
Line 196 : if (this.config.ForbiddenPrefixMarkers.Contains(ch))

ForbiddenPrefixMarkers is null

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