forked from extern/egroupware
Log useful error message if select or radio custom field has no values
This commit is contained in:
parent
579b4f6923
commit
4b989d016c
@ -216,7 +216,11 @@ class Customfields implements \IteratorAggregate
|
|||||||
|
|
||||||
case 'select':
|
case 'select':
|
||||||
case 'radio':
|
case 'radio':
|
||||||
if (count($field['values']) == 1 && isset($field['values']['@']))
|
if(!$field['values'])
|
||||||
|
{
|
||||||
|
error_log("{$field['app']} custom field '{$field['name']}' has no values" );
|
||||||
|
}
|
||||||
|
else if (count($field['values']) == 1 && isset($field['values']['@']))
|
||||||
{
|
{
|
||||||
$field['values'] = self::get_options_from_file($field['values']['@']);
|
$field['values'] = self::get_options_from_file($field['values']['@']);
|
||||||
}
|
}
|
||||||
@ -259,6 +263,7 @@ class Customfields implements \IteratorAggregate
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
restore_error_handler();
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user