chartmogul/chartmogul-php

Fatal error when customer is not found with ChartMogul\Customer::findByExternalId

bilbof opened this issue · 0 comments

Requesting a customer with findByExternalId throws a Fatal error.

$external_id = "123";
$customer = ChartMogul\Customer::findByExternalId([
   "external_id" => $external_id
]);
Fatal error: Call to a member function first() on null in /Users/Bill/c-php-test/vendor/chartmogul/chartmogul-php/src/Customer.php on line 109

https://github.com/chartmogul/chartmogul-php/blob/master/src/Customer.php#L109