WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#9177 closed defect (bug) (fixed)

Remove meta_value from selected fields

Reported by: filosofo Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch query meta_value meta_key
Focuses: Cc:

Description

[8922], the fix for #7431, introduced an unnecessary line that adds wp_postmeta.meta_value to the list of selected fields.

Talking to AaronCampbell, the author of the above patch, in IRC confirmed my hunch that it was unintentional.

If you're querying by meta_value, then you already know the meta_value value. If you're querying by just meta_key, then you will (in theory) not get back all meta_values because there will be only one entry per post (see #9167). So meta_value is either unnecessary or unreliable as Loop query data.

Attachments (1)

remove.meta_value.field.select.9177.diff (472 bytes) - added by filosofo 5 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 ryan5 years ago

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

(In [10601]) Remove meta_value from selected fields. Props filosofo. fixes #9177 for 2.7

comment:2 ryan5 years ago

[10600] for trunk

Note: See TracTickets for help on using tickets.