Vonage / vonage-php-sdk-core

Vonage REST API client for PHP. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
https://developer.vonage.com/
Apache License 2.0
916 stars 180 forks source link

array_merge issue in Client authRequest #128

Closed acarpio89 closed 5 years ago

acarpio89 commented 6 years ago

We are having the following error affecting a small portion of our users:

array_merge(): Argument #1 is not an array {"exception":"[object] (ErrorException(code: 0): array_merge(): Argument #1 is not an array at /var/www/app/vendor/nexmo/client/src/Client.php:205)
[stacktrace]
#0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'array_merge(): ...', '/var/www/app/ve...', 205, Array)
#1 /var/www/app/vendor/nexmo/client/src/Client.php(205): array_merge(NULL, Array)
#2 /var/www/app/vendor/nexmo/client/src/Client.php(359): Nexmo\\Client::authRequest(Object(Zend\\Diactoros\\Request), Object(Nexmo\\Client\\Credentials\\Basic))
#3 /var/www/app/vendor/nexmo/client/src/Message/Client.php(48): Nexmo\\Client->send(Object(Zend\\Diactoros\\Request))

Seems like something is going wrong with the authentication request, but only in some specific cases. The majority of times it works nicely, so I would discard an issue with our credentials. Are there any know causes to this problem? Could it be a regional issue? (the reports we've heard are from users in UAE and China).

acarpio89 commented 6 years ago

I know this is not a lot of information to go with, but it's all I have at the moment. Sorry!

lornajane commented 6 years ago

It's not a lot of information but we appreciate the bug report regardless! I couldn't reproduce which isn't a surprise as you say it works the majority of the time. We'll keep trying and if you can keep us posted with anything more at your end, that would be helpful too.

lornajane commented 5 years ago

Closing due to inactivity, but please re-open if you have more information relating to this issue.