Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/05/2020 05:57:36 PM (4 years ago)
Author:
johnjamesjacoby
Message:

Meta: always query meta_value by string, not by integer.

This commit swaps "%d" for "%s" when querying by meta_value, even with numeric values. This allows for custom index alterations to perform as intended, and also more closely follows how WordPress core itself operates.

In trunk, for 2.7. Fixes #3408.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/functions.php

    r7098 r7150  
    17381738                            ON p.ID = pm.post_id
    17391739                            AND pm.meta_key = %s
    1740                     WHERE pm.meta_value = %d
     1740                    WHERE pm.meta_value = %s
    17411741                    GROUP BY p.post_status, p.post_type";
    17421742
Note: See TracChangeset for help on using the changeset viewer.