Skip to content

[Routing] fix url generation for optional parameter having a null value #7369

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

Merged
merged 1 commit into from
Mar 14, 2013

Conversation

Tobion
Copy link
Contributor

@Tobion Tobion commented Mar 14, 2013

Q A
Bug fix? [yes]
New feature? [no]
BC breaks? [no]
Deprecations? [no]
Tests pass? [yes
Fixed tickets [#7316]
License MIT

fabpot added a commit that referenced this pull request Mar 14, 2013
This PR was merged into the 2.2 branch.

Commits
-------

d7a7434 [Routing] fix url generation for optional parameter having a null value

Discussion
----------

[Routing] fix url generation for optional parameter having a null value

| Q             | A
| ------------- | ---
| Bug fix?      | [yes]
| New feature?  | [no]
| BC breaks?    | [no]
| Deprecations? | [no]
| Tests pass?   | [yes|]
| Fixed tickets | [#7316]
| License       | MIT
@fabpot fabpot merged commit d7a7434 into symfony:2.2 Mar 14, 2013
@Tobion Tobion deleted the null-for-optional-param branch March 14, 2013 11:42
@Maxwell2022
Copy link

I still have the same problem with 2.2.1 and knp-menu which is using Symfony\Component\Routing\Generator\UrlGeneratorInterface to generate the routes.

$root->addChild('menu.message.view', array('route' => 'acme_message_view', 'routeParameters' =>array('id' => $id)))->setDisplay(false);

If I set the id to 0 if this one is null it's working.

We might want to add some test for this as it was working in 2.1.*?

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.

3 participants