From 4d80f67cd10b8c0e8d2e18c5585ea91fdd6f1d9f Mon Sep 17 00:00:00 2001 From: Hamza Bakri Date: Mon, 19 Aug 2024 12:20:31 +0200 Subject: [PATCH] fix handle conditions: in some cases however conditions do have values, we do need the OPERATORS 'IS NULL' and 'IS NOT NULL' and since they are only available in the condition without values, some filters are not working anymore --- .../ConditionParsers/Drupal/DrupalConditionParser.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/extra/src/Querying/ConditionParsers/Drupal/DrupalConditionParser.php b/packages/extra/src/Querying/ConditionParsers/Drupal/DrupalConditionParser.php index 74c58512..6e7cd893 100644 --- a/packages/extra/src/Querying/ConditionParsers/Drupal/DrupalConditionParser.php +++ b/packages/extra/src/Querying/ConditionParsers/Drupal/DrupalConditionParser.php @@ -53,9 +53,8 @@ public function parseCondition($condition): PathsBasedInterface if (array_key_exists(DrupalFilterParser::VALUE, $condition )) { if (!array_key_exists(DrupalFilterParser::OPERATOR, $condition ) - || (array_key_exists(DrupalFilterParser::OPERATOR, $condition ) - && ($condition[DrupalFilterParser::OPERATOR] !== 'IS NULL' - && $condition[DrupalFilterParser::OPERATOR] !== 'IS NOT NULL'))) { + || ($condition[DrupalFilterParser::OPERATOR] !== 'IS NULL' + && $condition[DrupalFilterParser::OPERATOR] !== 'IS NOT NULL')) { return $this->drupalConditionFactory->createConditionWithValue($operatorName, $condition[DrupalFilterParser::VALUE], $path); } }