[wp-trac] [WordPress Trac] #35023: get_field_name() returns a bad field name if you pass it "display][avatar_size"
WordPress Trac
noreply at wordpress.org
Sun Dec 13 00:57:27 UTC 2015
#35023: get_field_name() returns a bad field name if you pass it
"display][avatar_size"
--------------------------------------+------------------------------
Reporter: pbearne | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: administration
--------------------------------------+------------------------------
Comment (by pbearne):
my second patch just changes the method of the test to see if a string
with bra[foo][foo] is passed
The more I look at this I feel this is wrong, if we want the ability to
pass an '''array''' why aren't passing a '''real array''' instead of
'sudo' array in a string ( bra[foo][foo] is not an array ) I feel tha the
patch was wrong. We should be testing for is_array and switching on that
not looking a "[" in string
I know this was a hack, but it worked for the last 6 years
all the function did was take a string and wrap it in brackets and prefix
it doesn't now do that
Sorry to keep on but I do feel we got this wrong in 4.4 and we should fix
before it is used
Paul
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35023#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list