Skip to content

Commit

Permalink
bug #3533 Missing 'throw new ' before error message (mdeherder)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.0.x-dev branch.

Discussion
----------

Missing 'throw new ' before error message

See #3532

At line 145 of CrudBuilderUrl, a sprintf message is not preceeding by 'throw new ..'

Commits
-------

ca3754e Missing 'throw new ' before error message
  • Loading branch information
javiereguiluz committed Jul 12, 2020
2 parents baaa432 + ca3754e commit 86fb6d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Router/CrudUrlBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function generateUrl(): string
// transform 'crudControllerFqcn' into 'crudId'
if (null !== $crudControllerFqcn = $this->get('crudControllerFqcn')) {
if (null === $crudId = $this->crudControllers->findCrudIdByCrudFqcn($crudControllerFqcn)) {
sprintf('The given "%s" class is not a valid CRUD controller. Make sure it extends from "%s" or implements "%s".', $crudControllerFqcn, AbstractCrudController::class, CrudControllerInterface::class);
throw new \InvalidArgumentException(sprintf('The given "%s" class is not a valid CRUD controller. Make sure it extends from "%s" or implements "%s".', $crudControllerFqcn, AbstractCrudController::class, CrudControllerInterface::class));
}

$this->set('crudId', $crudId);
Expand Down

0 comments on commit 86fb6d3

Please sign in to comment.