webfox / laravel-xero-oauth2

A Laravel integration for Xero using the Oauth 2.0 spec
MIT License
50 stars 32 forks source link

Webhook credentialManager bug #25

Closed leolinardi closed 4 years ago

leolinardi commented 4 years ago

A bug on Webhook.php was found in line 41, which causes an error of TypeError Argument 1 passed to Webfox\Xero\WebhookEvent::__construct() must be an instance of Webfox\Xero\OauthCredentialManager, null given

resolved by assigning the $credentialManager first, before creating the instance Collection $this->credentialManager = $credentialManager; $this->events = new Collection(array_map(function($event) { return new WebhookEvent($this->credentialManager, $this->accountingApi, $event); }, $this->properties->get('events')));

hailwood commented 4 years ago

Thank you @leolinardi

This has been fixed in v1.3.1