From 851aa8bef4a2b34f29d53cc5de71fc14b6f38e65 Mon Sep 17 00:00:00 2001 From: Tigran Gabrielyan Date: Wed, 25 Jul 2012 14:13:25 -0700 Subject: [PATCH] Fixed issue in _validateRouteClass where setting defaultRouteClass back to CakeRoute would throw an exception --- lib/Cake/Routing/Router.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index 42a29374b..cb28f6e9c 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -182,7 +182,10 @@ class Router { * @throws RouterException */ protected static function _validateRouteClass($routeClass) { - if (!class_exists($routeClass) || !is_subclass_of($routeClass, 'CakeRoute')) { + if ( + $routeClass != 'CakeRoute' && + (!class_exists($routeClass) || !is_subclass_of($routeClass, 'CakeRoute')) + ) { throw new RouterException(__d('cake_dev', 'Route classes must extend CakeRoute')); } return $routeClass;