FIX: Banco vacio o con espacio
This commit is contained in:
@ -68,18 +68,14 @@ class Mapper implements Define\Repository\Mapper
|
||||
}
|
||||
$value = $data[$column];
|
||||
if ($this->hasFunction()) {
|
||||
if ($value !== null and $value !== '') {
|
||||
try {
|
||||
$value = ($this->function)($data);
|
||||
} catch (EmptyResult $exception) {
|
||||
if ($this->hasDefault()) {
|
||||
$value = $this->default;
|
||||
} else {
|
||||
throw $exception;
|
||||
}
|
||||
try {
|
||||
$value = ($this->function)($data);
|
||||
} catch (EmptyResult $exception) {
|
||||
if ($this->hasDefault()) {
|
||||
$value = $this->default;
|
||||
} else {
|
||||
throw $exception;
|
||||
}
|
||||
} elseif ($this->hasDefault()) {
|
||||
$value = $this->default;
|
||||
}
|
||||
}
|
||||
$model->{$property} = $value;
|
||||
|
Reference in New Issue
Block a user