Skip to content

Commit

Permalink
Fix HasAttributes::mutateAttributeForArray not accounting for hasAttr…
Browse files Browse the repository at this point in the history
…ibuteGetMutator (#42130)
  • Loading branch information
aijorgenson authored Apr 26, 2022
1 parent 0129dcb commit 40dc9b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,8 @@ protected function mutateAttributeForArray($key, $value)
$value = $value instanceof DateTimeInterface
? $this->serializeDate($value)
: $value;
} elseif ($this->hasAttributeGetMutator($key)) {
$value = $this->mutateAttributeMarkedAttribute($key, $value);
} else {
$value = $this->mutateAttribute($key, $value);
}
Expand Down

0 comments on commit 40dc9b9

Please sign in to comment.