Skip to content
Permalink
Browse files

Remove duplicate code.

The conditions for persistParams() work should be self contained. Remove
this duplication.
  • Loading branch information...
markstory committed Aug 2, 2013
1 parent 8209a29 commit 19ac39963adbb9430b465a03e06731fb2d8eff1d
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/Cake/Routing/Router.php
@@ -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, '/');

0 comments on commit 19ac399

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.