[wp-trac] [WordPress Trac] #16597: Bug in the maybe_serialize() function - it serializing also serailize objects.
WordPress Trac
wp-trac at lists.automattic.com
Sat Feb 19 20:57:37 UTC 2011
#16597: Bug in the maybe_serialize() function - it serializing also serailize
objects.
--------------------------+------------------------------
Reporter: maorb | Owner: nacin
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 3.0.5
Severity: major | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by maorb):
I agree with you that what goes in should come out.
Anyway, there are situations of different methods to insert data and thus
it sometimes will go as an array and sometimes as a serialized data.
For this example I encountered - there are some meta keys that are indeed
being passed as an array, where the end user just saves data from the
admin panel.
But, in this case for the same site, there is a way of importing csv file
to the database.
All these custom fields that are being saved into one meta_key and the
meta_value is the serialized array, cannot be passed as an object when it
comes to a csv file, since you cannot pass an array in a csv, thus when
data comes from csv it must be serialized first.
I thought that the maybe_serialize() should check if the data passes it
alreay serialized and not to serialize it again..
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16597#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list