[wp-trac] [WordPress Trac] #41502: _wp_expand_nav_menu_post_data() corrupts multiple select (array value)

WordPress Trac noreply at wordpress.org
Tue Dec 12 05:30:38 UTC 2017


#41502: _wp_expand_nav_menu_post_data() corrupts multiple select (array value)
---------------------------+------------------------------
 Reporter:  elliotcondon   |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Menus          |     Version:  4.9
 Severity:  normal         |  Resolution:
 Keywords:  needs-testing  |     Focuses:  administration
---------------------------+------------------------------
Changes (by dd32):

 * keywords:   => needs-testing
 * focuses:   => administration
 * component:  General => Menus


Comment:

 Hey @elliotcondon - Sorry this never got any attention.

 Would you be able to put together a short example plugin which shows the
 behaviour you're seeing? or steps on how to recreate it easily using ACF?

 Looking at the code, and testing it with browser-inserted fields, it at
 first looks like it's working as expected for me, but I might be mis-
 understanding how you're expecting it to work, or I might be missing a
 crucial step.
 {{{
 JSON Posted:
 [
 ...
  {
     "name": "testing[]",
     "value": "A"
   },
   {
     "name": "testing[]",
     "value": "B"
   },
 ...
 ]

 Resulting var_dump( $_POST ):
 ...
   'testing' =>
     array (size=2)
       0 => string 'A' (length=1)
       1 => string 'B' (length=1)
 ...
 }}}

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


More information about the wp-trac mailing list