[wp-trac] [WordPress Trac] #32224: delete_post_meta() not working as expected when $meta_value is specified as 0 or '0'

WordPress Trac noreply at wordpress.org
Fri May 1 16:37:39 UTC 2015


#32224: delete_post_meta() not working as expected when $meta_value is specified as
0 or '0'
--------------------------------+---------------------------
 Reporter:  husobj              |       Owner:  boonebgorges
     Type:  defect (bug)        |      Status:  closed
 Priority:  normal              |   Milestone:  4.3
Component:  Options, Meta APIs  |     Version:  4.2.1
 Severity:  normal              |  Resolution:  fixed
 Keywords:                      |     Focuses:
--------------------------------+---------------------------
Changes (by boonebgorges):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"32331"]:
 {{{
 #!CommitTicketReference repository="" revision="32331"
 Allow metadata to be deleted when meta_value matches 0 or '0'.

 In `delete_metadata()`, be stricter about when to ignore a falsey value of
 `$meta_value`.

 For backward compatibility, an empty string for `$meta_value` is
 equivalent to
 `null` or `false`.

 Props sc0ttkclark.
 Fixes #32224.
 }}}

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


More information about the wp-trac mailing list