diff --git a/src/Message/AbstractMessage.php b/src/Message/AbstractMessage.php index a796b67..0b51d57 100644 --- a/src/Message/AbstractMessage.php +++ b/src/Message/AbstractMessage.php @@ -26,7 +26,7 @@ public function __construct(array $data = []) $methodName = 'set' . ucfirst($k); if (method_exists($this, $methodName)) { $this->{$methodName}($v); - } else { + } elseif (isset($this->{$k})) { $this->{$k} = $v; } }