mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2025-02-11 10:49:23 +03:00
Allow any data type for custom data
This commit is contained in:
parent
7f2fa66030
commit
f2af6df726
@ -314,15 +314,7 @@ class MessageBuilder
|
|||||||
|
|
||||||
public function addCustomData($customName, $data)
|
public function addCustomData($customName, $data)
|
||||||
{
|
{
|
||||||
if (is_array($data)) {
|
$this->message['v:' . $customName] = json_encode($data);
|
||||||
$jsonArray = json_encode($data);
|
|
||||||
$this->message['v:' . $customName] = $jsonArray;
|
|
||||||
|
|
||||||
return $this->message['v:' . $customName];
|
|
||||||
} else {
|
|
||||||
throw new InvalidParameter(INVALID_PARAMETER_NON_ARRAY);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addCustomParameter($parameterName, $data)
|
public function addCustomParameter($parameterName, $data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user