Commit bd90218c authored by catch's avatar catch
Browse files

Issue #3232695 by alexpott: Only process values in config entity query...

Issue #3232695 by alexpott: Only process values in config entity query conditions for operators that have values
parent 504b0dbf
Loading
Loading
Loading
Loading
+3 −0
Changes for core/lib/Drupal/Core/Config/Entity/Query/Condition.php: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@ public function compile($configs) {
          $condition['operator'] = is_array($condition['value']) ? 'IN' : '=';
        }

        // Process the value for operator that use it.
        if (!in_array($condition['operator'], ['IS NULL', 'IS NOT NULL'], TRUE)) {
          // Lowercase condition value(s) for case-insensitive matches.
          if (is_array($condition['value'])) {
            $condition['value'] = array_map('mb_strtolower', $condition['value']);
@@ -36,6 +38,7 @@ public function compile($configs) {
          elseif (!is_bool($condition['value'])) {
            $condition['value'] = mb_strtolower($condition['value']);
          }
        }

        $single_conditions[] = $condition;
      }