Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpClient] Declare$active first to prevent weird issue#32989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
$active first to prevent weird issue$active first to prevent weird issueUh oh!
There was an error while loading.Please reload this page.
Kocal commentedAug 6, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedAug 6, 2019
Would using |
Kocal commentedAug 6, 2019
I don't have the time for now, I will check it out this evening. |
Kocal commentedAug 6, 2019
Huh, so I don't understand why. It's a variable declared in a reference so it should be ok... Maybe because of a weird PHP configuration, it fails? |
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
(issue in tests was unrelated to this PR and has been fixed in#33005)
nicolas-grekas commentedAug 7, 2019
Thank you@Kocal. |
…e (Kocal)This PR was squashed before being merged into the 4.3 branch (closes#32989).Discussion----------[HttpClient] Declare `$active` first to prevent weird issue| Q | A| ------------- | ---| Branch? | 4.3| Bug fix? | yes| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | - <!-- please add some, will be required by reviewers -->| Fixed tickets |#32833 <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | noIn some undefined cases we can have the following error while using the WebTestCase/CurlHttpClient in PHPUnit:This is really weird because `$active` is a reference and so it does not need to be declared before, but doing that fixes the issue. (#32833 (comment))I can't add tests because we were not able to reproduce the issue...Commits-------ba030f0 [HttpClient] Declare `$active` first to prevent weird issue

Uh oh!
There was an error while loading.Please reload this page.
In some undefined cases we can have the following error while using the WebTestCase/CurlHttpClient in PHPUnit:

This is really weird because
$activeis a reference and so it does not need to be declared before, but doing that fixes the issue. (#32833 (comment))I can't add tests because we were not able to reproduce the issue...