Skip to content

Commit

Permalink
Merge pull request #1 from securit/securit-patch-1
Browse files Browse the repository at this point in the history
getRawSchemalessAttributes() must be of the type array
  • Loading branch information
securit authored Mar 17, 2020
2 parents dbcad90 + d5f931f commit c253ee1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/SchemalessAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ public function getIterator()

protected function getRawSchemalessAttributes(): array
{
return $this->model->fromJson($this->model->getAttributes()[$this->sourceAttributeName] ?? '{}');
$attributes = $this->model->getAttributes()[$this->sourceAttributeName] ?? '{}';

return ($attributes =='""' ? [] : $this->model->fromJson($attributes));
}

protected function override(iterable $collection)
Expand Down

0 comments on commit c253ee1

Please sign in to comment.