From df881baf55b19bb33d85f21d4acfa33be707b8b1 Mon Sep 17 00:00:00 2001
From: webchick <drupal@webchick.net>
Date: Sun, 23 Nov 2014 21:28:40 -0800
Subject: [PATCH] Issue #2341461 by ashutoshsngh, esod, quietone: Remove usage
 of form_options_flatten()

---
 core/modules/views/src/Plugin/views/filter/InOperator.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/core/modules/views/src/Plugin/views/filter/InOperator.php b/core/modules/views/src/Plugin/views/filter/InOperator.php
index 51468afa38c4..82dabe09a49f 100644
--- a/core/modules/views/src/Plugin/views/filter/InOperator.php
+++ b/core/modules/views/src/Plugin/views/filter/InOperator.php
@@ -12,6 +12,7 @@
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\views\Plugin\views\display\DisplayPluginBase;
 use Drupal\views\ViewExecutable;
+use Drupal\Core\Form\OptGroup;
 
 /**
  * Simple filter to handle matching of multiple options selectable via checkboxes
@@ -435,7 +436,7 @@ public function validate() {
       }
 
       // Some filter_in_operator usage uses optgroups forms, so flatten it.
-      $flat_options = form_options_flatten($this->valueOptions, TRUE);
+      $flat_options = OptGroup::flattenOptions($this->valueOptions);
 
       // Remove every element which is not known.
       foreach ($this->value as $value) {
-- 
GitLab