Commit 62cddeb3 authored by Martin Keereman's avatar Martin Keereman
Browse files

Issue #3106332 by dmitry.korhov: Undefined index: exposed_form_options

parent abcf30f9
......@@ -188,7 +188,7 @@ class BetterExposedFilters extends InputRequired {
// User raw user input for AJAX callbacks.
$user_input = $form_state->getUserInput();
$bef_input = $user_input['exposed_form_options']['bef'];
$bef_input = $user_input['exposed_form_options']['bef'] ?? NULL;
/*
* General BEF settings
......@@ -559,7 +559,7 @@ class BetterExposedFilters extends InputRequired {
// Validate exposed filter configuration.
if ($type === 'filter') {
foreach ($config as $filter_id => $filter_options) {
$plugin_id = $filter_options['configuration']['plugin_id'];
$plugin_id = $filter_options['configuration']['plugin_id'] ?? NULL;
if (!$plugin_id) {
continue;
}
......@@ -574,7 +574,7 @@ class BetterExposedFilters extends InputRequired {
}
// Validate exposed pager/sort configuration.
elseif (in_array($type, ['pager', 'sort'])) {
$plugin_id = $config['configuration']['plugin_id'];
$plugin_id = $config['configuration']['plugin_id'] ?? NULL;
if (!$plugin_id) {
continue;
}
......@@ -625,7 +625,7 @@ class BetterExposedFilters extends InputRequired {
// Save exposed filter configuration.
if ($type === 'filter') {
foreach ($config as $filter_id => $filter_options) {
$plugin_id = $filter_options['configuration']['plugin_id'];
$plugin_id = $filter_options['configuration']['plugin_id'] ?? NULL;
/** @var \Drupal\better_exposed_filters\Plugin\BetterExposedFiltersWidgetInterface $plugin */
if (!$plugin_id) {
unset($bef_options['filter'][$filter_id]);
......@@ -645,7 +645,7 @@ class BetterExposedFilters extends InputRequired {
}
// Save exposed pager/sort configuration.
elseif (in_array($type, ['pager', 'sort'])) {
$plugin_id = $config['configuration']['plugin_id'];
$plugin_id = $config['configuration']['plugin_id'] ?? NULL;
if (!$plugin_id) {
unset($bef_options[$type]);
continue;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment