Skip to content

Commit

Permalink
bug #3219 Fixed a bug related to actions of entities without permissi…
Browse files Browse the repository at this point in the history
…on (javiereguiluz)

This PR was merged into the 3.0.x-dev branch.

Discussion
----------

Fixed a bug related to actions of entities without permission

This fixes #3212.

Commits
-------

f874f18 Fixed a bug related to actions of entities without permission
  • Loading branch information
javiereguiluz committed May 13, 2020
2 parents c6486e7 + f874f18 commit 049ea2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Factory/ActionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ private function generateActionUrl(string $currentAction, Request $request, Acti

if (null !== $routeName = $actionDto->getRouteName()) {
$routeParameters = $actionDto->getRouteParameters();
if (\is_callable($routeParameters)) {
$routeParameters = $routeParameters($entityDto->getInstance());
if (\is_callable($routeParameters) && null !== $entityInstance = $entityDto->getInstance()) {
$routeParameters = $routeParameters($entityInstance);
}

return $this->urlGenerator->generate($routeName, $routeParameters);
Expand Down

0 comments on commit 049ea2d

Please sign in to comment.