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 1d826e798a
commit 8ae20c34b9

View File

@ -160,7 +160,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'] == false)
if(array_key_exists('multiple', $this->attrs) && $this->attrs['multiple'] == false && is_array($value))
{
$value = array_shift($value);
}