-
Notifications
You must be signed in to change notification settings - Fork 38
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
Possible NullReference Exception #53
Comments
Nice catch, would you mind sending a PR with a minor version bump... |
Let me see. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
africastalking.Net/AfricasTalkingCS/AfricasTalkingGateway.cs
Line 398 in 640b195
Hi, this check will fail when a string in
null
since you can't call.Length
on a null string object.I would suggest using String.IsNullOrWhiteSpace(String) to do the check.
You can create a test case wherein you pass null for phoneNumber/shortCode/keyWord and see that a
NullObjectReferenceException
is thrown instead of the anticipatedAfricasTalkingGatewayException
The text was updated successfully, but these errors were encountered: