From 2c02825de2882dcf62b12bc7e9b69c699650abd6 Mon Sep 17 00:00:00 2001 From: Kristiaan Van den Eynde Date: Thu, 25 Jun 2020 16:55:31 +0200 Subject: [PATCH] Issue #3154858 by kristiaanvandeneynde: Drupal\Core\Config\Entity\Query\Condition::notExists() does not work when parent property is also missing --- core/lib/Drupal/Core/Config/Entity/Query/Condition.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/lib/Drupal/Core/Config/Entity/Query/Condition.php b/core/lib/Drupal/Core/Config/Entity/Query/Condition.php index 2adfd80d5f..b7c8f9028f 100644 --- a/core/lib/Drupal/Core/Config/Entity/Query/Condition.php +++ b/core/lib/Drupal/Core/Config/Entity/Query/Condition.php @@ -129,6 +129,11 @@ protected function matchArray(array $condition, array $data, array $needs_matchi if ($this->matchArray($condition, $data[$key], $needs_matching, $new_parents)) { return TRUE; } + // If the parent does not exist, it's safe to say the actual property + // we're checking for is also NULL. + elseif ($condition['operator'] === 'IS NULL') { + return TRUE; + } } } // Only try to match a scalar if there are no remaining keys in -- 2.17.1