Skip to content
Snippets Groups Projects
Commit 3b8554d6 authored by Malcolm Young's avatar Malcolm Young Committed by Shashank Kumar
Browse files

Issue #3372736: Test form fails to send

parent ff0530cc
No related branches found
No related tags found
1 merge request!24Issue #3372736: Test form fails to send
......@@ -67,13 +67,13 @@ class Sms extends TwilioBase {
* ].
*/
public function messageSend(string $number, $message) {
$fromNumber = $this->twilioCommand->getNumber();
if (is_string($message)) {
$message = [
'from' => $this->twilioCommand->getNumber(),
'body' => $message,
];
}
$message['from'] = !empty($message['from']) ? $message['from'] : $this->number;
$message['from'] = !empty($message['from']) ? $message['from'] : $fromNumber;
if (empty($message['body'])) {
throw new TwilioException("Message requires a body.");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment