Skip to content

Commit 6285474

Browse files
fix: Creation of dynamic property is deprecated (#102)
Co-authored-by: Luffy <52o@qq52o.cn>
1 parent d08f6b9 commit 6285474

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Message/AbstractMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct(array $data = [])
2626
$methodName = 'set' . ucfirst($k);
2727
if (method_exists($this, $methodName)) {
2828
$this->{$methodName}($v);
29-
} else {
29+
} elseif (isset($this->{$k})) {
3030
$this->{$k} = $v;
3131
}
3232
}

0 commit comments

Comments
 (0)