do not validate vfs-widgets not returning a value, as it overwrites preserved values with null

This commit is contained in:
Ralf Becker 2014-12-02 19:17:03 +00:00
parent 4d80104403
commit f7610cd6d6

View File

@ -149,6 +149,11 @@ error_log(lang('Error copying uploaded file to vfs!'));
*/
public function validate($cname, array $expand, array $content, &$validated=array())
{
// do not validate, as it would overwrite preserved values with null!
if (in_array($this->type, array('vfs-size', 'vfs-uid', 'vfs-gid', 'vfs', 'vfs-mime')))
{
return;
}
$form_name = self::form_name($cname, $this->id, $expand);
$value = $value_in = self::get_array($content, $form_name);
$valid =& self::get_array($validated, $form_name, true);