[wp-trac] [WordPress Trac] #57512: Warning as a part of API response

WordPress Trac noreply at wordpress.org
Fri Jan 20 14:57:47 UTC 2023


#57512: Warning as a part of API response
--------------------------+------------------------------
 Reporter:  kalpeshh      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  REST API      |     Version:  6.1.1
 Severity:  normal        |  Resolution:
 Keywords:  2nd-opinion   |     Focuses:  rest-api
--------------------------+------------------------------

Comment (by shooper):

 I was able to replicate this bug in PHP 8.0, but not in 7.4.

 It appears that the list() function now throws a warning if the explode()
 function does not return at least the number of array elements that list()
 is expecting.

 According to the RFC for Basic Authentication, both a username and
 password are required.

 I've patched the wp_populate_basic_auth_from_authorization_header()
 function to return false if both are not provided.

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


More information about the wp-trac mailing list