Skip to content

Commit

Permalink
Merge pull request #152 from sergio-agosti/master
Browse files Browse the repository at this point in the history
Fix use of $params in facade message method
  • Loading branch information
hannesvdvreken authored May 3, 2018
2 parents 0fd74d5 + 5922d27 commit d358283
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Twilio.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ public function __construct($sid, $token, $from, $sslVerify = true)
*/
public function message($to, $message, $mediaUrls = null, array $params = [])
{
$options['body'] = $message;
$params['body'] = $message;

if (!isset($options['from'])) {
$options['from'] = $this->from;
if (!isset($params['from'])) {
$params['from'] = $this->from;
}

if (!empty($medialUrls)) {
$options['mediaUrl'] = $mediaUrls;
$params['mediaUrl'] = $mediaUrls;
}

return $this->getTwilio()->messages->create($to, $options);
return $this->getTwilio()->messages->create($to, $params);
}

/**
Expand Down

0 comments on commit d358283

Please sign in to comment.