Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Dec 13, 2023
1 parent 2283833 commit 1af8993
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/BaseActiveRecordTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ public function __set(string $name, mixed $value): void
$this->resetDependentRelations($name);
}
$this->attributes[$name] = $value;
} elseif (method_exists($this, 'get' . ucfirst($name))) {
return;
}

if (method_exists($this, 'get' . ucfirst($name))) {
throw new InvalidCallException('Setting read-only property: ' . static::class . '::' . $name);
}
}
Expand Down

0 comments on commit 1af8993

Please sign in to comment.