Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

reverts some behavior changes made in c66d1f9

  • Loading branch information...
commit 6fea997908607f18a970a3848ec89c8e775255f3 1 parent a8599d5
@schmittjoh schmittjoh authored
View
2  Generator/UrlGenerator.php
@@ -261,7 +261,7 @@ protected function doGenerate($variables, $defaults, $requirements, $tokens, $pa
}
// add a query string if needed
- $extra = array_diff_key($parameters, $variables);
+ $extra = array_diff_key($parameters, $variables, $defaults);
if ($extra && $query = http_build_query($extra, '', '&')) {
$url .= '?'.$query;
}
View
4 Tests/Generator/UrlGeneratorTest.php
@@ -297,8 +297,8 @@ public function testQueryParamSameAsDefault()
{
$routes = $this->getRoutes('test', new Route('/test', array('default' => 'value')));
- $this->assertSame('/app.php/test?default=foo', $this->getGenerator($routes)->generate('test', array('default' => 'foo')));
- $this->assertSame('/app.php/test?default=value', $this->getGenerator($routes)->generate('test', array('default' => 'value')));
+ $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('default' => 'foo')));
+ $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test', array('default' => 'value')));
$this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test'));
}
Please sign in to comment.
Something went wrong with that request. Please try again.