From 83fd578f9637419698e728515966aa7d308f046d Mon Sep 17 00:00:00 2001 From: Henne Van Och Date: Thu, 15 Jun 2017 15:33:54 +0200 Subject: [PATCH] Reset redirectCount when throwing exception --- src/Symfony/Component/BrowserKit/Client.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Component/BrowserKit/Client.php b/src/Symfony/Component/BrowserKit/Client.php index c695990838..b5b2dab50d 100644 --- a/src/Symfony/Component/BrowserKit/Client.php +++ b/src/Symfony/Component/BrowserKit/Client.php @@ -448,6 +448,7 @@ abstract class Client if (-1 !== $this->maxRedirects) { if ($this->redirectCount > $this->maxRedirects) { + $this->redirectCount = 0; throw new \LogicException(sprintf('The maximum number (%d) of redirections was reached.', $this->maxRedirects)); } }