tzsk / sms

Laravel SMS Gateway Integration Package
MIT License
289 stars 79 forks source link

To Fix array_merge(): Argument #1 is not an array laravel 5.4 #11

Closed karthiksk0062 closed 6 years ago

karthiksk0062 commented 6 years ago

To Fix array_merge(): Argument #1 is not an array

please remove array_merge() functionality on Textlocal.php send() as it's the case which arises response as error on when the mobile number to send SMS is registered as dnd on Trai. Code has to be changed as mentioned below public function send() { $numbers = implode(",", $this->recipients);

$response = $this->client->request("POST", $this->settings->url, [
    "form_params" => [
        "username" => $this->settings->username,
        "hash" => $this->settings->hash,
        "numbers" => $numbers,
        "sender" => urlencode($this->settings->sender),
        "message" => $this->body,
    ],
]);

$data = $this->getResponseData($response);

return (object) $data;

} Note: As I am using this package on my Laravel project when vendor folder get updated error arises so to fix this issue please change as soon as possible

tzsk commented 6 years ago

@karthiksk0062 Please update your package. I've released V1.2.1. And please confirm if the issue is fixed now. I'll reopen if it is not fixed.