GloBee-Official / payment-api-php

SDK for the GloBee Payment API
https://globee.com
Other
5 stars 2 forks source link

Fix is_resource returning false in php8 #19

Open willbrowningme opened 3 years ago

willbrowningme commented 3 years ago

In PHP8 is_resource(curl_init()) returns false. This causes $this->client to be overwritten each time $this->getClient() is called e.g in the send method of GloBeeCurlConnector which results in an error since no URL is set when curl_exec($this->getClient()) is called.

This pull request adds is_object() to prevent $this->client being overwritten in PHP8.

Mentioned in this repo too - https://github.com/aliyun/aliyun-oss-php-sdk/pull/153

Tested and working on my server.

willbrowningme commented 3 years ago

Is this repo still maintained?

willbrowningme commented 3 years ago

Is there anything in particular blocking this from being merged?

Eddie-Globee commented 3 years ago

Hi @willbrowningme we're having a look at it. Will update you as it's merged in.