[wp-trac] [WordPress Trac] #63576: API Requests sometimes lose body

WordPress Trac noreply at wordpress.org
Mon Jun 16 15:55:40 UTC 2025


#63576: API Requests sometimes lose body
--------------------------+-----------------------------
 Reporter:  granthony     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  HTTP API      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In limited circumstances, HTTP requests made using wp-
 includes/Requests/src/Requests.php will incorrectly return an empty string
 as the response body, even though the request executed and returned a
 value in the response.

 This happens when the returned value is PHP-falsey (for example, the
 string "0") - or in other words, when empty($value) evaluates to true in
 PHP.

 I've encountered this issue in production, so the diff we went with is
 attached.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63576>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list