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

Warning when $condition_group_arg['groups'] is NULL/not an array in addConditionGroup() #41

Closed
morvans opened this issue Mar 1, 2021 · 1 comment · May be fixed by #42
Closed

Warning when $condition_group_arg['groups'] is NULL/not an array in addConditionGroup() #41

morvans opened this issue Mar 1, 2021 · 1 comment · May be fixed by #42
Labels
bug Something isn't working needs more info Need more information regarding the request

Comments

@morvans
Copy link

morvans commented Mar 1, 2021

If the query contains a condition group argument with no groups inside, the foreach loop in addConditionGroup() may emit a warning/notice.

@carolpettirossi
Copy link
Collaborator

Hi @morvans,
I couldn't reproduce the warning you mentioned. Can you please share more details?

I've tried this query:

query SearchEmployers(
  $condition_group: ConditionGroupInput, 
  $facets: [FacetInput], 
  $fulltext: FulltextInput, 
  $index_id: String!, 
  $range: RangeInput, 
  $sort: [SortInput]
) {
  searchAPISearch(
    condition_group: $condition_group, 
    facets: $facets, 
    fulltext: $fulltext, 
    index_id: $index_id, 
    range: $range, 
    sort: $sort
  ) {
    __typename
    result_count
  }
}

with these arguments:

  1. "condition_group": {}
{
  "index_id": "anabranch_connect_index",
  "condition_group": {},
  "range": {
    "offset": 0,
    "limit": 10
  },
  "sort": [
    {
      "field": "advertiser_name",
      "value": "asc"
    }
  ],
  "facets": []
}
  1. "groups": {}
{
  "index_id": "anabranch_connect_index",
  "condition_group": {
    "groups": {}
  },
  "range": {
    "offset": 0,
    "limit": 10
  },
  "sort": [
    {
      "field": "advertiser_name",
      "value": "asc"
    }
  ],
  "facets": []
}

@carolpettirossi carolpettirossi added bug Something isn't working needs more info Need more information regarding the request labels Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs more info Need more information regarding the request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants