diff --git a/cake/libs/dispatcher.php b/cake/libs/dispatcher.php index 95ea8055f..e9aff026a 100644 --- a/cake/libs/dispatcher.php +++ b/cake/libs/dispatcher.php @@ -176,9 +176,11 @@ class Dispatcher { * @return array Parameters found in POST and GET. */ public function parseParams(CakeRequest $request, $additionalParams = array()) { - $namedExpressions = Router::getNamedExpressions(); - extract($namedExpressions); - include CONFIGS . 'routes.php'; + if (count(Router::$routes) > 0) { + $namedExpressions = Router::getNamedExpressions(); + extract($namedExpressions); + include CONFIGS . 'routes.php'; + } $params = Router::parse($request->url); $request->addParams($params);