[wp-trac] [WordPress Trac] #17087: get_post_meta returns empty array when requesting non-exsistent post meta

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 9 02:22:31 UTC 2011


#17087: get_post_meta returns empty array when requesting non-exsistent post meta
-------------------------------+------------------------------
 Reporter:  thomasvonhassel    |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  General            |     Version:  3.1
 Severity:  major              |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------
Changes (by greuben):

 * keywords:   => reporter-feedback


Comment:

 Can't reproduce it.

 {{{
 $meta = get_post_meta( $post->ID, 'metakey', true ); // returns string(0)
 ""
 $meta = get_post_meta( $post->ID, 'metakey' ); // returns array(0) { }
 }}}

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


More information about the wp-trac mailing list