mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
fix fatal error if customfields contains widget with no validation method --> nothing to validate / return
This commit is contained in:
parent
ea3e642a0c
commit
8f713fe2f1
@ -344,6 +344,8 @@ class etemplate_widget_customfields extends etemplate_widget_transformer
|
||||
}
|
||||
// run validation method of widget implementing this custom field
|
||||
$widget = $this->_widget($fname, $field_settings);
|
||||
// widget has no validate method, eg. is only displaying stuff --> nothing to validate
|
||||
if (!method_exists($widget, 'validate')) continue;
|
||||
$widget->validate($form_name != self::GLOBAL_ID ? $form_name : $cname, $expand, $content, $validated);
|
||||
if ($field_settings['needed'] && (is_array($value) ? !$value : (string)$value === ''))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user