fix PHP Warning: array_shift() expects parameter 1 to be array, null given

This commit is contained in:
Ralf Becker 2018-10-19 13:55:23 +02:00
parent 37f6c97441
commit 10f7170797

View File

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