Merge pull request #29398 from nextcloud/backport/29378/stable22

[stable22] Make the route name error more helpful
This commit is contained in:
MichaIng 2021-10-23 20:12:28 +02:00 committed by GitHub
commit daeeae4ae0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -130,7 +130,7 @@ class RouteConfig {
$split = explode('#', $name, 2);
if (count($split) !== 2) {
throw new \UnexpectedValueException('Invalid route name');
throw new \UnexpectedValueException('Invalid route name: use the format foo#bar to reference FooController::bar');
}
[$controller, $action] = $split;

View file

@ -93,7 +93,7 @@ class RouteParser {
$split = explode('#', $name, 2);
if (count($split) !== 2) {
throw new \UnexpectedValueException('Invalid route name');
throw new \UnexpectedValueException('Invalid route name: use the format foo#bar to reference FooController::bar');
}
[$controller, $action] = $split;