Skip to content

Commit

Permalink
Merge pull request #29399 from nextcloud/backport/29378/stable21
Browse files Browse the repository at this point in the history
[stable21] Make the route name error more helpful
  • Loading branch information
MichaIng authored Oct 23, 2021
2 parents bf35e6e + 48d97fa commit a17529b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/private/AppFramework/Routing/RouteConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ protected function processRoute(array $route, string $routeNamePrefix = ''): voi

$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');
}
list($controller, $action) = $split;

Expand Down
2 changes: 1 addition & 1 deletion lib/private/AppFramework/Routing/RouteParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private function processRoute(array $route, string $appName, string $routeNamePr

$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');
}
list($controller, $action) = $split;

Expand Down

0 comments on commit a17529b

Please sign in to comment.