This commit is contained in:
2024-12-31 15:52:20 +08:00
parent 1666af9906
commit 11a939e8a1
+1 -1
View File
@@ -692,7 +692,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \
public function __set(string $name, mixed $value): void public function __set(string $name, mixed $value): void
{ {
$prefix = 'set' . ucfirst($name); $prefix = 'set' . ucfirst($name);
if (method_exists($name, $prefix)) { if (method_exists($this, $prefix)) {
$this->{$prefix}($value); $this->{$prefix}($value);
return; return;
} }