[wp-trac] [WordPress Trac] #20853: get_post_custom show directly serialized data from the post_meta arrays.

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 6 07:58:49 UTC 2012


#20853: get_post_custom show directly serialized data from the post_meta arrays.
--------------------------+------------------------------
 Reporter:  shadowhck     |       Owner:
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  3.4
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+------------------------------

Comment (by rosshanney):

 The [http://codex.wordpress.org/Function_Reference/get_post_custom Codex
 page] for {{{get_post_custom}}} states:

   Note: not only does the function return a multi-dimensional array (ie:
 always be prepared to deal with an array of arrays, even if expecting
 array of single values), but it also returns serialized values of any
 arrays stored as meta values. If you expect that possibly an array may be
 stored as a metavalue, then be prepared to
 '[http://codex.wordpress.org/Function_Reference/maybe_unserialize
 maybe_unserialize]'.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20853#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list