[wp-trac] [WordPress Trac] #56832: update_post_meta / get_post_meta data corruption in serialization

WordPress Trac noreply at wordpress.org
Sat Oct 15 21:39:39 UTC 2022


#56832: update_post_meta / get_post_meta data corruption in serialization
--------------------------------+------------------------
 Reporter:  loopy255            |       Owner:  (none)
     Type:  defect (bug)        |      Status:  closed
 Priority:  normal              |   Milestone:
Component:  Options, Meta APIs  |     Version:
 Severity:  normal              |  Resolution:  duplicate
 Keywords:                      |     Focuses:
--------------------------------+------------------------

Comment (by TimothyBlynJacobs):

 In your example code you are calling `get_post_meta` without the third
 `$single` parameter set to `true`. When that parameter is omitted, the
 metadata APIs return a list of all meta values for that post with the
 given key.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56832#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list