Reset redirectCount when throwing exception

This commit is contained in:
Henne Van Och 2017-06-15 15:33:54 +02:00 committed by GitHub
parent 3c2b1ff929
commit 83fd578f96
1 changed files with 1 additions and 0 deletions

View File

@ -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));
}
}