Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search: Fix fatal when offloading user queries on WP 6.1 #4049

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

rebeccahum
Copy link
Contributor

@rebeccahum rebeccahum commented Jan 12, 2023

Description

A fatal occurs when attempting to offload a user query with the default fields on WP 6.1:
Screenshot 2023-01-12 at 4 10 03 PM

Adapted from 10up/ElasticPress#3109

Changelog Description

Plugin Updated: Enterprise Search

Fix fatal when offloading user queries on WP 6.1 with the default fields

Checklist

Please make sure the items below have been covered before requesting a review:

  • This change works and has been tested locally (or has an appropriate fallback).
  • This change works and has been tested on a Go sandbox.
  • This change has relevant unit tests (if applicable).
  • This change uses a rollout method to ease with deployment (if applicable - especially for large scale actions that require writes).
  • This change has relevant documentation additions / updates (if applicable).
  • I've created a changelog description that aligns with the provided examples.

Steps to Test

  1. Add the snippet:
 add_action( 'init', function() {
    $args = array (
        's'     => 'k',
        'ep_integrate' => true,
    );

    $authors = new WP_User_Query($args);

 });
  1. Observe fatal in description
  2. pull in PR with submodule update
  3. Observe no more fatal and query being offloaded correctly

@sonarcloud
Copy link

sonarcloud bot commented Jan 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov
Copy link

codecov bot commented Jan 12, 2023

Codecov Report

Merging #4049 (f93af4f) into develop (4f50274) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             develop    #4049   +/-   ##
==========================================
  Coverage      32.23%   32.23%           
  Complexity      3789     3789           
==========================================
  Files            229      229           
  Lines          16965    16965           
==========================================
  Hits            5469     5469           
  Misses         11496    11496           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@rinatkhaziev rinatkhaziev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants