Loading core/lib/Drupal/Core/Config/Entity/Query/Condition.php +5 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,11 @@ protected function matchArray(array $condition, array $data, array $needs_matchi 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 // $needs_matching as this indicates that we are looking for a specific Loading core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php +10 −0 Original line number Diff line number Diff line Loading @@ -606,6 +606,16 @@ public function testDotted() { ->notExists('array') ->execute(); $this->assertResults([]); // Make sure that "IS NULL" and "IS NOT NULL" work correctly when the dotted // path cannot be fully followed. $this->queryResults = $this->entityStorage->getQuery() ->exists('does.not.exist') ->execute(); $this->assertResults([]); $this->queryResults = $this->entityStorage->getQuery() ->notExists('does.not.exist') ->execute(); $this->assertResults($all); } /** Loading Loading
core/lib/Drupal/Core/Config/Entity/Query/Condition.php +5 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,11 @@ protected function matchArray(array $condition, array $data, array $needs_matchi 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 // $needs_matching as this indicates that we are looking for a specific Loading
core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php +10 −0 Original line number Diff line number Diff line Loading @@ -606,6 +606,16 @@ public function testDotted() { ->notExists('array') ->execute(); $this->assertResults([]); // Make sure that "IS NULL" and "IS NOT NULL" work correctly when the dotted // path cannot be fully followed. $this->queryResults = $this->entityStorage->getQuery() ->exists('does.not.exist') ->execute(); $this->assertResults([]); $this->queryResults = $this->entityStorage->getQuery() ->notExists('does.not.exist') ->execute(); $this->assertResults($all); } /** Loading