public function validator($varInput)
{
if (!is_array($varInput)) {
return null;
// see #382
}
foreach ($varInput as $k => $v) {
if ($k != 'language') {
$varInput[$k] = array_map('trim', $v);
} else {
if ($v != '') {
// Take the fields from the DCA (see #4327)
$varInput[$v] = array_combine(array_keys($this->metaFields), array_fill(0, count($this->metaFields), ''));
}
unset($varInput[$k]);
}
}
return $varInput;
}