[wp-trac] [WordPress Trac] #11683: update_metadata() passes only the first meta_id

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 1 18:04:40 UTC 2010


#11683: update_metadata() passes only the first meta_id
--------------------------+-------------------------------------------------
 Reporter:  scribu        |       Owner:     
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.0
Component:  General       |     Version:  2.9
 Severity:  normal        |    Keywords:     
--------------------------+-------------------------------------------------
 Code to reproduce:

 {{{
 function update_metadata_action_test($meta_id) {
         var_dump($meta_id);
 }
 add_action('update_post_meta', 'update_metadata_action_test');

 add_metadata('post', 1, 'mykey', 'value1');
 add_metadata('post', 1, 'mykey', 'value2');

 update_metadata('post', 1, 'mykey', 'new value');
 }}}

 Expected result:

 {{{
 Array ( [0] => 101 [1] => 102 )
 }}}

 Actual result:

 {{{
 string(3) "101"
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11683>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list