Skip to content

Commit de48c2e

Browse files
committed
bug symfony#13365 [HttpFoundation] Make use of isEmpty() method (xelaris)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes symfony#13365). Discussion ---------- [HttpFoundation] Make use of isEmpty() method | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- fc51d54 [HttpFoundation] Make use of isEmpty() method
2 parents 76de700 + fc51d54 commit de48c2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function prepare(Request $request)
207207
{
208208
$headers = $this->headers;
209209

210-
if ($this->isInformational() || in_array($this->statusCode, array(204, 304))) {
210+
if ($this->isInformational() || $this->isEmpty()) {
211211
$this->setContent(null);
212212
$headers->remove('Content-Type');
213213
$headers->remove('Content-Length');

0 commit comments

Comments
 (0)