mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed issue in _validateRouteClass where setting defaultRouteClass back to CakeRoute would throw an exception
This commit is contained in:
parent
7d74f3e598
commit
851aa8bef4
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue