[wp-trac] [WordPress Trac] #43561: $object_id parameter is string instead of integer in delete_{$meta_type}_meta inside delete_metadata_by_mid()

WordPress Trac noreply at wordpress.org
Thu Mar 15 20:32:36 UTC 2018


#43561: $object_id parameter is string instead of integer in
delete_{$meta_type}_meta inside delete_metadata_by_mid()
--------------------------+------------------------------
 Reporter:  salcode       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by salcode):

 I've made this branch on GitHub we're I'm looking into this,
 [https://github.com/salcode/wordpress-develop/tree/sf/object-id-string-
 not-int-43561 sf/object-id-string-not-int-43561]

 I've added a failing test in [https://github.com/salcode/wordpress-
 develop/commit/b84811855aaaa34730d2f31bd8cb047ee997a6e9 b848118] to
 illustrate the problem.

 Here is the result of the test

 {{{
 1)
 Tests_Meta_DeleteMetadata::test_object_id_is_int_inside_delete_post_meta
 Failed asserting that two strings are equal.
 --- Expected
 +++ Actual
 @@ @@
 -'integer'
 +'string'
 }}}

 And I've added a patch to cast `$object_id` to an `int` in
 [https://github.com/salcode/wordpress-
 develop/commit/d70e520eead7f0881eb75e91241742b9b6bb3a0e d70e520eea]

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


More information about the wp-trac mailing list