mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge pull request #739 from tigrang/router-validate-route-fix
Fixed issue where restoring the default route class would cause an exception.
This commit is contained in:
commit
a03166c5b6
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