diff --git a/src/Message.php b/src/Message.php index 7e6e6e6..ac5aab0 100644 --- a/src/Message.php +++ b/src/Message.php @@ -39,16 +39,14 @@ public function addTo($to, $control = true) { $destinations = (array) $to; - if ($control) { - foreach ($destinations as $destination) { - if (in_array($destinations, $this->destinations)) { - throw DestinationAlreadyExits::create($destination); - } + foreach ($destinations as $destination) { + if ($control && in_array($destinations, $this->destinations)) { + throw DestinationAlreadyExits::create($destination); + } else { + $this->destinations[] = $destination; } } - $this->destinations[] = $destination; - return $this; } diff --git a/src/Sms.php b/src/Sms.php index b78560d..56b8ba5 100644 --- a/src/Sms.php +++ b/src/Sms.php @@ -23,7 +23,7 @@ class Sms * * @var string */ - private $app = 'php-sms v1.0.9'; + private $app = 'php-sms v1.0.10'; /** * Define if then sent is dryrun.