fix <taglist multiple="false" returns array(<id>)

more complete fix for server-side handling of boolean attributes commited to master
This commit is contained in:
Ralf Becker 2018-09-13 15:41:24 +02:00
parent 2b5b9470c7
commit cf1471f7aa

View File

@ -151,7 +151,7 @@ class Taglist extends Etemplate\Widget
{ {
self::set_validation_error($form_name,lang('Field must not be empty !!!',$value),''); self::set_validation_error($form_name,lang('Field must not be empty !!!',$value),'');
} }
if(array_key_exists('multiple', $this->attrs) && $this->attrs['multiple'] == false) if(array_key_exists('multiple', $this->attrs) && (!$this->attrs['multiple'] || $this->attrs['multiple'] === 'false'))
{ {
$value = array_shift($value); $value = array_shift($value);
} }