prawnsalad / Nexmo-PHP-lib

Nexmo SMS gateway example library
MIT License
121 stars 98 forks source link

Error when have bad credentials #13

Open nunorafaelrocha opened 11 years ago

nunorafaelrocha commented 11 years ago

I found an error when authentication fails on nexmo.

The function "nexmoParse" parses every messages and sums the total cost like this: $total_cost = $total_cost + (float)$msg->messageprice;

But when you have an authentication error the parser gives an error because "messageprice" is not defined.

I corrected myself by change the code to: if (isset($msg->messageprice)) { $total_cost = $total_cost + (float)$msg->messageprice; }

yemilgr commented 11 years ago

agree i had the same error :+1: