Skip to content

Check for children.#1291

Closed
richardhj wants to merge 1 commit intohotfix/2.1.1from
richardhj-patch-2
Closed

Check for children.#1291
richardhj wants to merge 1 commit intohotfix/2.1.1from
richardhj-patch-2

Conversation

@richardhj
Copy link
Copy Markdown
Member

Description

Fixes https://sentry.io/share/issue/ae6d1418cf194bbba3827eb5dc9d9690/ and https://sentry.io/share/issue/7687bab48f2f42fdaa5f69875f9f322d/)

Checklist

  • Read and understood the CONTRIBUTING guidelines
  • Created tests, if possible
  • All tests passing
  • Extended the README / documentation, if necessary
  • Added myself to the @authors in touched PHP files
  • Checked the changes with phpcq and introduced no new issues

@richardhj richardhj requested a review from discordier March 25, 2019 15:03
@baumannsven baumannsven mentioned this pull request Mar 25, 2019
6 tasks
@zonky2 zonky2 added the bug A bug! A bug! Fast, squish it! label Mar 25, 2019
@zonky2 zonky2 added this to the 2.1.1 milestone Mar 25, 2019
// Try to parse the sub procedure and extract as much as possible.
if (($child['operation'] == 'AND') || ($child['operation'] == 'OR')) {
$subProcedure = new FilterBuilderSql($tableName, $child['operation'], $this->connection);
$subSkipped = $this->buildNativeSqlProcedure($subProcedure, $child['children']);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Couldn't we just do

if (null === $child['children']) {
    continue;
}

here?
This would omit indenting everything here one level down.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure! My fault. Ready for review.

@discordier
Copy link
Copy Markdown
Member

Author validation? 😸

discordier added a commit that referenced this pull request Apr 3, 2019
Check if children exist in `FilterBuilder` for AND and OR filter.
@discordier discordier closed this Apr 3, 2019
@discordier discordier deleted the richardhj-patch-2 branch April 3, 2019 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug A bug! A bug! Fast, squish it!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants