Skip to content

Fix: This handles the issue where a URL parameter like ?age=null ca… #62630

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: main
Choose a base branch
from

Conversation

1257960069
Copy link

…nnot be bound to an int? type

Fix: This handles the issue where a URL parameter like ?age=null cannot be bound to an int? type. This fix ensures that when the frontend sends a URL parameter with null value (e.g., new URLSearchParams({ age: null }).toString()),
it correctly binds to a nullable integer (int?) instead of causing a binding error.

{PR title}

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Summary of the changes (Less than 80 chars)

Description

{Detail}

Fixes #{bug number} (in this specific format)

…nnot be bound to an `int?` type

Fix: This handles the issue where a URL parameter like `?age=null` cannot be bound to an `int?` type.
This fix ensures that when the frontend sends a URL parameter with `null` value (e.g., `new URLSearchParams({ age: null }).toString()`),
 it correctly binds to a nullable integer (`int?`) instead of causing a binding error.
@1257960069 1257960069 requested a review from a team as a code owner July 9, 2025 13:15
@github-actions github-actions bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Jul 9, 2025
Copy link
Contributor

Thanks for your PR, @@1257960069. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jul 9, 2025
Copy link
Member

@captainsafia captainsafia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this PR. Our protocol requires that PRs associated with an issue so we can understand whether the proposed solution is correct. Is there an issue associated with this change? Also, test coverage is required for this change.

@captainsafia captainsafia added the pr: pending author input For automation. Specifically separate from Needs: Author Feedback label Jul 9, 2025
@1257960069
Copy link
Author

1257960069 commented Jul 9, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates community-contribution Indicates that the PR has been added by a community member pr: pending author input For automation. Specifically separate from Needs: Author Feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants