Ticket #1912 (closed defect (bug): fixed)

Opened 6 years ago

Last modified 5 years ago

Postmeta Values may not be literal zeroes

Reported by: skippy Owned by: anonymous
Priority: normal Milestone:
Component: Administration Version: 1.6
Severity: major Keywords: postmeta metavalue bg|has-patch bg|commit
Cc:

Description

The add_meta() function uses a simple if !empty($metavalue) check to determine whether a meta value has been supplied. empty() treats zeroes as false, so a literal zero as a postmeta value fails. The attached patch fixes it. The patch DOES NOT allow a zero for a postmeta key.

Attachments

zero-postmeta-value.diff Download (730 bytes) - added by skippy 6 years ago.

Change History

skippy6 years ago

comment:1   matt6 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [3221]) Allow 0 for postmeta, fixes #1912

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.