[wp-trac] [WordPress Trac] #47305: PHP Warning with PHP 7.3

WordPress Trac noreply at wordpress.org
Fri Apr 24 00:27:00 UTC 2020


#47305: PHP Warning with PHP 7.3
-------------------------------+------------------------------
 Reporter:  onlanka            |       Owner:  (none)
     Type:  defect (bug)       |      Status:  reopened
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  HTTP API           |     Version:  5.2
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by mikeill):

 I'm not sure if this is relevant so please forgive me if not. I'm using
 php 7.0 and WordPress 5.4 at the moment and noticed something interesting.

 When calling `wp_remote_post()` with the `POST` method, the `body` of the
 request needs to be `json_encode`d or fields are not properly transferred.

 When calling `wp_remote_post()` with the `GET` method, the `body` of the
 request seems to work either as an array *or* a json object, but when it
 is `json_encode`d, it returns the above mentioned warning.

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


More information about the wp-trac mailing list