[wp-trac] [WordPress Trac] #58566: WP_Http::normalize_cookies does not convert cookie names to strings

WordPress Trac noreply at wordpress.org
Thu Sep 21 16:19:25 UTC 2023


#58566: WP_Http::normalize_cookies does not convert cookie names to strings
--------------------------+------------------------------
 Reporter:  nosilver4u    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  HTTP API      |     Version:  6.2.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by nosilver4u):

 Ah, that's a good catch on the PHP "feature", I hadn't thought of that
 happening. So there's no sense in casting the array indices to string,
 since they won't be preserved.
 Instead, the Cookie() constructor should accept string OR integer values
 for the $name parameter. I think it's good for to be validating the
 "input", so I don't think dropping the exception would be appropriate.

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


More information about the wp-trac mailing list