WordPress.org

Make WordPress Core

Opened 11 months ago

Last modified 11 days ago

#51736 assigned task (blessed)

wp_remote_retrieve_header returns an Array for multiple headers

Reported by: robtarr Owned by: johnjamesjacoby
Milestone: 5.9 Priority: normal
Severity: normal Version: 2.7
Component: HTTP API Keywords: dev-feedback needs-patch
Focuses: docs Cc:

Description

When calling wp_remote_retrieve_header and specifying a header that has multiple entries in the response this method returns an array. The docs, however, indicate that it should return a string.

I think that this should probably throw an error if the wrong type comes back.

Change History (1)

#1 @johnjamesjacoby
11 days ago

  • Focuses docs added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.9
  • Owner set to johnjamesjacoby
  • Status changed from new to assigned
  • Type changed from enhancement to task (blessed)
  • Version set to 2.7

Hey @robtarr 👋 Good catch!

I'll take care of this, related to #53399.

Note: See TracTickets for help on using tickets.