[wp-trac] [WordPress Trac] #37768: HTTP API No Longer Accepts Integer and Float Values for the 'cookies' Argument since v4.6

WordPress Trac noreply at wordpress.org
Tue Aug 23 20:14:27 UTC 2016


#37768: HTTP API No Longer Accepts Integer and Float Values for the 'cookies'
Argument since v4.6
--------------------------------------+-------------------------
 Reporter:  miunosoft                 |       Owner:  swissspidy
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  4.6.1
Component:  HTTP API                  |     Version:  4.6
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-------------------------
Changes (by swissspidy):

 * keywords:   => has-patch has-unit-tests


Comment:

 `WP_Http::normalize_cookies()` only checks for values that are instances
 of `WP_Http_Cookie` and strings. Any other scalar value gets ignored. That
 method was introduced in 4.6 so something definitely changed there.

 [attachment:37768.diff] changes this by casting scalars to strings.

 @dd32 @rmccue As I am not that familiar with the HTTP API, I'd love to
 hear your opinion on this.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37768#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list