Skip to content

Commit

Permalink
Merge pull request #588 from bmupex/master
Browse files Browse the repository at this point in the history
Replaces call to deprecated isMasterRequest with isMainRequest
  • Loading branch information
alexislefebvre authored Aug 6, 2021
2 parents f6900d8 + b6676cc commit f5fe0fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Validator/DataCollectingValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ public function inContext(ExecutionContextInterface $context): ContextualValidat

public function onKernelRequest(GetResponseEvent $event): void
{
if ($event->isMasterRequest()) {
if (method_exists($event, 'isMainRequest') && $event->isMainRequest()) {
$this->clearLastErrors();
} elseif ($event->isMasterRequest()) {
$this->clearLastErrors();
}
}
Expand Down

0 comments on commit f5fe0fc

Please sign in to comment.