Skip to content

Commit

Permalink
Merge pull request #2586 from rebeccahum/fix/get_total_objects_for_qu…
Browse files Browse the repository at this point in the history
…ery_ep_indexing_upper_limit_object_id

get_total_objects_for_query_from_db(): bail if we have any limits set
  • Loading branch information
felipeelia authored Feb 7, 2022
2 parents e26abd9 + f64c11e commit da94959
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/classes/Indexable/Post/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ protected function get_total_objects_for_query( $query_args ) {
protected function get_total_objects_for_query_from_db( $query_args ) {
$post_count = 0;

if ( ! isset( $query_args['post_type'] ) ) {
if ( ! isset( $query_args['post_type'] ) || isset( $query_args['ep_indexing_upper_limit_object_id'] )
|| isset( $query_args['ep_indexing_lower_limit_object_id'] ) ) {
return $post_count;
}

Expand Down

0 comments on commit da94959

Please sign in to comment.