XeroAPI / xero-php-oauth2

Xero PHP SDK for oAuth 2 generated from Xero API OpenAPI Spec 3.0
MIT License
90 stars 64 forks source link

Fix SplFileObject handling #277

Closed mbardelmeijer closed 2 years ago

mbardelmeijer commented 2 years ago

This fixes an issue introduced in 2.13.0. SplFileObject is handled in the is_array check, which will try to use settype on the SplFileObject, which turns into a ValueError

settype(): Argument #2 ($type) must be a valid type

By placing the SplFileObject earlier, that fixes the issue.

I know this isn't the right solution, i.e. it should be generated from the OpenAPI spec, but I was unable to find how best to regenerate it, as it seems already fixed on the openapi-generator, so opened this PR for discussion.

pumpkinball commented 2 years ago

resolved in latest release 2.14.0