Commit 0d2ac859 authored by CbStuart's avatar CbStuart Committed by Rick Hawkins
Browse files

Issue #2936892 by matthieuscarset, CbStuart, rlhawk: Undefined index #options...

Issue #2936892 by matthieuscarset, CbStuart, rlhawk: Undefined index #options when $form['sort_order'] is exposed as Radios
parent 3298924f
......@@ -767,12 +767,14 @@ Title Desc|Z -> A</pre> Leave the replacement text blank to remove an option alt
// Leave sort_by and sort_order as separate elements.
if ('bef' == $settings['sort']['bef_format']) {
foreach (['sort_by', 'sort_order'] as $field) {
$form[$field]['#theme'] = 'bef_radios';
$form[$field]['#type'] = 'radios';
if (empty($form[$field]['#process'])) {
$form[$field]['#process'] = array();
if (!empty($form[$field])) {
$form[$field]['#theme'] = 'bef_radios';
$form[$field]['#type'] = 'radios';
if (empty($form[$field]['#process'])) {
$form[$field]['#process'] = array();
}
$form[$field]['#process'][] = ['\Drupal\Core\Render\Element\Radios', 'processRadios'];
}
$form[$field]['#process'][] = ['\Drupal\Core\Render\Element\Radios', 'processRadios'];
}
}
elseif ('bef_links' == $settings['sort']['bef_format']) {
......
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