[wp-trac] [WordPress Trac] #10803: get_post_meta doesn't return an array when requested if nothing with that key exists.

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 17 20:20:21 UTC 2009


#10803: get_post_meta doesn't return an array when requested if nothing with that
key exists.
--------------------------+-------------------------------------------------
 Reporter:  westi         |       Owner:  westi      
     Type:  defect (bug)  |      Status:  new        
 Priority:  normal        |   Milestone:  2.9        
Component:  General       |     Version:  2.8.4      
 Severity:  normal        |    Keywords:  2nd-opinion
--------------------------+-------------------------------------------------
Description changed by westi:

Old description:

> e.g. get_post_meta($this->post_id, 'unique', false)
>
> Where no metadata for key 'unique' exist on the post returns '' instead
> of array('');

New description:

 e.g. get_post_meta($this->post_id, 'unique', false)

 Where no metadata for key 'unique' exist on the post returns {{{''}}}
 instead of {{{array('')}}};

--

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


More information about the wp-trac mailing list