symfony/symfony — pull request #4191 by danielholmes (2012-05-03 09:12:42+00:00)
Title: [Routing] fixed route generation when pattern already has question mark

Bug fix: yes
Feature addition: no
Backwards compatibility break: If someone relied no this bug, yes
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

I sometimes have routes like the following used purely for generating a url, whether that be to the symfony app or an external app:

```yaml
blog_news:
pattern: /blog/?category=news
```

When generating this route with extra parameters, the url it generates is invalid.

```php
$router->generate('blog_news', array('page' => 2));
// results in /blog/?category=news?page=2
```

I've changed the generator to use & if the url already has a ?