[buddypress-trac] [BuddyPress] #2172: Function bp_profile_field_data () returns raw data for non-string data types
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Sun Dec 5 16:17:53 UTC 2010
#2172: Function bp_profile_field_data () returns raw data for non-string data
types
-------------------------------------+--------------------------------------
Reporter: foxly | Owner: boonebgorges
Type: defect | Status: assigned
Priority: minor | Milestone: 1.3
Component: Core | Version:
Keywords: has-patch, dev-feedback |
-------------------------------------+--------------------------------------
Changes (by boonebgorges):
* keywords: bp_profile_field_data (), bp_get_profile_field_data () =>
has-patch, dev-feedback
* owner: => boonebgorges
* status: new => assigned
Comment:
See #2685, which is related.
I'm assuming that the reason why the value was being passed without
unserializing had to do with the filter being applied at the end of
xprofile_get_field_data(). That filter 'xprofile_get_field_data' is used
by BP core to run some common formatting/security filters, filters that
can't take arrays as values.
The attached patch 2172-1.patch contains a fix that checks to see whether
the value is a serialized array, and if so then it applies the filter
xprofile_get_field_data in question to each value in the array. I'm
posting it here before committing because I'd like a second opinion about
whether this is the best strategy.
--
Ticket URL: <http://trac.buddypress.org/ticket/2172#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list