[wp-trac] [WordPress Trac] #36590: POST['nav-menu-data'] breaks other POST values
WordPress Trac
noreply at wordpress.org
Tue Apr 19 23:51:45 UTC 2016
#36590: POST['nav-menu-data'] breaks other POST values
--------------------------+-----------------------------------------
Reporter: Unyson | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.5.1
Component: Menus | Version: 4.5
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript, administration
--------------------------+-----------------------------------------
Comment (by keraweb):
Currently the Json is decoded like this.
{{{#!php
<?php
json_decode( stripslashes( $_POST['nav-menu-data'] ) );
}}}
This creates an array of objects if I'm correct. I think changing this to
the code below could solve this since it will create an array of arrays.
{{{#!php
<?php
json_decode( stripslashes( $_POST['nav-menu-data'] ), true );
}}}
It's 2AM here so I'll do some tests tomorrow!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36590#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list