Fix selettori con la virgola

This commit is contained in:
Pek5892 2023-10-30 15:38:33 +01:00
parent 1c7fa5a5b5
commit ad1ea0f933
1 changed files with 6 additions and 1 deletions

View File

@ -41,7 +41,12 @@ class SelectHandler implements HandlerInterface
$values['class'][] = !empty($source) ? 'superselectajax' : 'superselect';
// Individuazione e gestione dei valori tramite array
$values['value'] = explode(',', $values['value']);
if (in_array('multiple', $extras)) {
$values['value'] = explode(',', $values['value']);
} else {
$values['value'] = (array)$values['value'];
}
if (count($values['value']) === 1 && strlen($values['value'][0]) === 0) {
$values['value'] = [];
}