Skip to content
Permalink
Browse files

refs #10778 mark routes intialized in setRouteCollection

  • Loading branch information...
steinkel committed Feb 27, 2018
1 parent 243211b commit d3fbbbcf65e4eda2ab3d0c95bb10ede06396b85c
Showing with 2 additions and 3 deletions.
  1. +1 −3 src/Routing/Middleware/RoutingMiddleware.php
  2. +1 −0 src/Routing/Router.php
@@ -14,7 +14,6 @@
*/
namespace Cake\Routing\Middleware;
=======
use Cake\Cache\Cache;
use Cake\Core\Configure;
use Cake\Core\PluginApplicationInterface;
@@ -74,10 +73,9 @@ protected function loadRoutes()
if (!$this->app) {
return;
}
$routeCollection = $this->buildRouteCollection();
Router::setRouteCollection($routeCollection);
// Prevent routes from being loaded again
Router::$initialized = true;
}
/**
@@ -1157,6 +1157,7 @@ public static function getRouteCollection()
public static function setRouteCollection($routeCollection)
{
static::$_collection = $routeCollection;
Router::$initialized = true;
}
/**

0 comments on commit d3fbbbc

Please sign in to comment.
You can’t perform that action at this time.