diff --git a/src/Table.php b/src/Table.php index 25ee687..37d3216 100644 --- a/src/Table.php +++ b/src/Table.php @@ -373,7 +373,7 @@ public function createFromDatabase(array $data) $data[$name] = $field->dataFromDatabase($data[$name]); } - if (!is_array($daga = $this->dataFromDatabase(array_intersect_key($data, $this->fields)))) { + if (!is_array($data = $this->dataFromDatabase(array_intersect_key($data, $this->fields)))) { throw new SimpleCrudException('Data not valid'); }