Mapper default null
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace Incoviba\Common\Implement\Repository;
|
||||
|
||||
use Error;
|
||||
use Closure;
|
||||
use Incoviba\Common\Define;
|
||||
|
||||
@ -46,7 +47,11 @@ class Mapper implements Define\Repository\Mapper
|
||||
}
|
||||
public function hasDefault(): bool
|
||||
{
|
||||
return isset($this->default);
|
||||
try {
|
||||
return isset($this->default) or $this->default === null;
|
||||
} catch (Error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function parse(Define\Model &$model, string $column, ?array $data): bool
|
||||
|
Reference in New Issue
Block a user