[wp-trac] [WordPress Trac] #36590: POST['nav-menu-data'] breaks other POST values

WordPress Trac noreply at wordpress.org
Sun Jun 19 12:24:28 UTC 2016


#36590: POST['nav-menu-data'] breaks other POST values
-------------------------------------+-------------------------------------
 Reporter:  Unyson                   |       Owner:  swissspidy
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  4.5.3
Component:  Menus                    |     Version:  4.5
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-unit-tests has-      |     Focuses:  javascript,
  patch commit                       |  administration
-------------------------------------+-------------------------------------
Changes (by swissspidy):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"37748"]:
 {{{
 #!CommitTicketReference repository="" revision="37748"
 Menus: Support nested array variables in POST data when saving menus.

 [36510] allowed larger menus to be created in the Edit Menu screen by
 JSON-encoding the entire form into a single input field. However, it did
 not correctly handle nested arrays.

 This introduces a new `_wp_expand_nav_menu_post_data()` helper function to
 handle this POST data which uses `array_replace_recursive()` internally.
 Since the latter is only available on PHP 5.3+, we add a compatibility
 function to ensure PHP 5.2 support.

 Props ericlewis, neverything, swissspidy.
 Fixes #36590 for trunk. See #14134.
 }}}

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


More information about the wp-trac mailing list