Skip to content

Commit

Permalink
Exception while apply refund transition
Browse files Browse the repository at this point in the history
Admin refund action throws exception
"Argument 1 passed to Symfony\Bundle\FrameworkBundle\Controller\Controller::isCsrfTokenValid() must be of the type string, integer given"
  • Loading branch information
kuzyk authored and pamil committed Jul 10, 2018
1 parent cea1226 commit dff366e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ public function applyStateMachineTransitionAction(Request $request): Response
$this->isGrantedOr403($configuration, ResourceActions::UPDATE);
$resource = $this->findOr404($configuration);

if ($configuration->isCsrfProtectionEnabled() && !$this->isCsrfTokenValid($resource->getId(), $request->get('_csrf_token'))) {
if ($configuration->isCsrfProtectionEnabled() && !$this->isCsrfTokenValid((string) $resource->getId(), $request->get('_csrf_token'))) {
throw new HttpException(Response::HTTP_FORBIDDEN, 'Invalid CSRF token.');
}

Expand Down

0 comments on commit dff366e

Please sign in to comment.