Skip to content

Commit

Permalink
Fix sfPatternRouting->getRoutes() sometimes returning serialized ro…
Browse files Browse the repository at this point in the history
…utes
  • Loading branch information
Jaume Alemany committed Aug 25, 2017
1 parent 69e1d42 commit 05c281b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/routing/sfPatternRouting.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@ public function getCurrentRouteName()
*/
public function getRoutes()
{
foreach ($this->routes as $name => $route) {
if (is_string($route)) {
$route = unserialize($route);
$route->setDefaultParameters($this->defaultParameters);
$this->routes[$name] = $route
}
}

return $this->routes;
}

Expand Down

0 comments on commit 05c281b

Please sign in to comment.