Skip to content

Commit

Permalink
fix Getting unknown property
Browse files Browse the repository at this point in the history
  • Loading branch information
sichkarev authored May 29, 2024
1 parent 5ebc175 commit d3b0444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/behaviors/AttributeTypecastBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public function typecastAttributes($attributeNames = null)
}

foreach ($attributeTypes as $attribute => $type) {
$value = $this->owner->{$attribute};
$value = $this->owner->hasAttribute($attribute) ? $this->owner->{$attribute} : null;
if ($this->skipOnNull && $value === null) {
continue;
}
Expand Down

0 comments on commit d3b0444

Please sign in to comment.