WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11872 closed defect (bug) (fixed)

Notice when HTTP response has headers only

Reported by: hakre Owned by: dd32
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: HTTP API Keywords: has-patch tested
Focuses: Cc:

Description

When doing a HTTP request and recieving an answer that only contains headers, it does create a notice because the array index for the body actually does not exists.

It should not.

I ran over this while giving the health-check plugin a testdrive and it does return such http request responses.

Attachments (1)

11872.patch (835 bytes) - added by hakre 4 years ago.

Download all attachments as: .zip

Change History (3)

hakre4 years ago

comment:1 nacin4 years ago

  • Component changed from Warnings/Notices to HTTP
  • Owner changed from westi to dd32

comment:2 dd324 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13849]) Avoid notices for requests with no body. Also fixes a few race conditions related to headers. Fixes #11872

Note: See TracTickets for help on using tickets.