Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #19549 [HttpFoundation] fixed Request::getContent() reusage bug (…
…1ma) This PR was squashed before being merged into the 2.7 branch (closes #19549). Discussion ---------- [HttpFoundation] fixed Request::getContent() reusage bug | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | After calling ```Request::getContent(true)```, subsequent calls to the same instance method (withouth the ```$asResource``` flag) always returned ```false``` instead of the request body as a plain string. A unit test already existed to guard against this behaviour (the 'Resource then fetch' case) but it yielded a false positive because it was comparing ```''``` to ```false``` using PHPUnit's ```assertEquals``` method instead of ```assertSame```. For completeness sake I also added the missing usage permutations in the data provider, which already worked OK. Commits ------- c42ac66 [HttpFoundation] fixed Request::getContent() reusage bug
- Loading branch information