Commit af2ea854 authored by ojohansson's avatar ojohansson Committed by Mike Keran
Browse files

Issue #2890222 by olofjohansson: Undefined offset: 1 in bef_sort_combine_submit()

parent 80233c4b
......@@ -296,8 +296,9 @@ function _bef_preprocess_nested_elements(array &$variables) {
*/
function bef_sort_combine_submit($form, FormStateInterface $form_state) {
$sortBy = $sortOrder = '';
if ($form_state->hasValue('sort_bef_combine')) {
list($sortBy, $sortOrder) = explode(' ', $form_state->getValue('sort_bef_combine'));
$combined = $form_state->getValue('sort_bef_combine');
if (!empty($combined)) {
list($sortBy, $sortOrder) = explode(' ', $combined);
}
$form_state->setValue('sort_by', $sortBy);
$form_state->setValue('sort_order', $sortOrder);
......
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