Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b8c94d0

Browse filesBrowse files
committed
bug #23199 Reset redirectCount when throwing exception (hvanoch)
This PR was merged into the 2.7 branch. Discussion ---------- Reset redirectCount when throwing exception | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #23197 | License | MIT When catching the exception throw when exceeding the redirect limit, all new request which results in a redirect fail. By resetting the redirectCount we can still use the same client instance. Commits ------- 83fd578 Reset redirectCount when throwing exception
2 parents 511905d + 83fd578 commit b8c94d0
Copy full SHA for b8c94d0

File tree

1 file changed

+1
-0
lines changed
Filter options

1 file changed

+1
-0
lines changed

‎src/Symfony/Component/BrowserKit/Client.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/BrowserKit/Client.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ public function followRedirect()
448448

449449
if (-1 !== $this->maxRedirects) {
450450
if ($this->redirectCount > $this->maxRedirects) {
451+
$this->redirectCount = 0;
451452
throw new \LogicException(sprintf('The maximum number (%d) of redirections was reached.', $this->maxRedirects));
452453
}
453454
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.