diff --git a/SimpleCrud/Row.php b/SimpleCrud/Row.php index 04f3da6..c0f875f 100644 --- a/SimpleCrud/Row.php +++ b/SimpleCrud/Row.php @@ -23,7 +23,7 @@ public function __construct (Entity $entity, array $data = null, $onlyDeclaredFi $data = array_intersect_key($data, $this->entity->getFieldsNames()); } - $this->values = ($data === null) ? $entity->getDefaults() : $data; + $this->values = ($data ?: array()) + $entity->getDefaults(); }