Skip to content

Commit

Permalink
Remove duplicate code.
Browse files Browse the repository at this point in the history
The conditions for persistParams() work should be self contained. Remove
this duplication.
  • Loading branch information
markstory committed Aug 2, 2013
1 parent 8209a29 commit 19ac399
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/Cake/Routing/Router.php
Expand Up @@ -848,9 +848,7 @@ public static function url($url = null, $full = false) {
for ($i = 0, $len = count(self::$routes); $i < $len; $i++) {
$originalUrl = $url;

if (isset(self::$routes[$i]->options['persist'], $params)) {
$url = self::$routes[$i]->persistParams($url, $params);
}
$url = self::$routes[$i]->persistParams($url, $params);

if ($match = self::$routes[$i]->match($url)) {
$output = trim($match, '/');
Expand Down

0 comments on commit 19ac399

Please sign in to comment.