Created
July 25, 2012 19:42
-
-
Save tigrang/3178144 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php | |
index 42a2937..c1956c5 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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment