Skip to content

Commit

Permalink
merged branch Tobion/patch-2 (PR #5843)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.1 branch.

Commits
-------

7447ef7 slight refactoring in UrlMatcher

Discussion
----------

slight refactoring in UrlMatcher

bc break: no
bug fix: no
feature addition: no

saving a variable
  • Loading branch information
fabpot committed Oct 26, 2012
2 parents 1277e67 + 7447ef7 commit 5155aec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Symfony/Component/Routing/Matcher/UrlMatcher.php
Expand Up @@ -174,13 +174,12 @@ protected function handleRouteRequirements($pathinfo, $name, Route $route)
*/
protected function mergeDefaults($params, $defaults)
{
$parameters = $defaults;
foreach ($params as $key => $value) {
if (!is_int($key)) {
$parameters[$key] = $value;
$defaults[$key] = $value;
}
}

return $parameters;
return $defaults;
}
}

0 comments on commit 5155aec

Please sign in to comment.