Skip to:
Content

bbPress.org

Changeset 7002


Ignore:
Timestamp:
11/24/2019 04:36:16 AM (5 years ago)
Author:
johnjamesjacoby
Message:

Engagements: explicitly query for -1 posts if no objects are known to exist.

This commit fixes an issue with the 2.5 User Engagements strategy that will cause all topics to be queried instead of none of them.

File:
1 edited

Legend:

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

    r6993 r7002  
    950950                'post__in' => $object_ids
    951951            );
     952
     953        // Or maybe include nothing
     954        } else {
     955            $args = array(
     956                'post__in' => -1 // Tricks WP_Query into ".ID IN ()"
     957            );
    952958        }
    953959
Note: See TracChangeset for help on using the changeset viewer.