[wp-trac] Re: [WordPress Trac] #4029: maybe_serialize() can do double-serialize

WordPress Trac wp-trac at lists.automattic.com
Sat Jun 14 00:28:13 GMT 2008

#4029: maybe_serialize() can do double-serialize
 Reporter:  takayukister            |        Owner:  anonymous
     Type:  defect                  |       Status:  closed   
 Priority:  normal                  |    Milestone:           
Component:  General                 |      Version:  2.2      
 Severity:  major                   |   Resolution:  invalid  
 Keywords:  has-patch dev-feedback  |  
Comment (by DD32):

 > where is documented when this function should be used?
 > where is documented why this function has been implemented?

 I'm not sure on either account, However, The use of maybe_serialize()/
 maybe_unserialize() functions are used when storing metadata(post,
 taxonomy, options), It means that a string can be saved as a pure
 string(unserialised) - which reduces on operations needed, It means that a
 integer gets straight into the db, it means that an array gets serialized
 before, etc. maybe_unserialize() does the same, if the input is
 serialised, it spits out the unserialised version, else lets it pass
 straight theough

Ticket URL: <http://trac.wordpress.org/ticket/4029#comment:11>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list