mailgun/mailgun-php

Undefined index: assignable_to_pools - Ip\IndexResponse

TWithers opened this issue · 1 comments

When using the following code:

$mg->ips()->domainIndex('my.domain.mg');

I get the warning:

PHP Notice: Undefined index: assignable_to_pools

It looks like the IPs API is not returning that field in all instances, and probably should be changed to a null coalescing operator inside Mailgun\Model\Ip\IndexResponse on line 45:

$model->assignableToPools = $data['assignable_to_pools'] ?? [];

Proposed changes were merge in another PR. Thank you