team-telnyx / telnyx-php

PHP SDK for the Telnyx API
MIT License
32 stars 26 forks source link

array_key_exists deprecated in php 7.4 #18

Closed mikeburrelljr closed 4 years ago

mikeburrelljr commented 4 years ago

I get the following exception due to deprecated php function:

ErrorException: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /home/vagrant/code/leadfoundry-api/vendor/telnyx/telnyx-php/lib/ApiRequestor.php:357

Code from ApiRequestor.php reads: if (array_key_exists('request-id', $rheaders)) {

To correct, this should be changed to isset() or property_exists().

See deprecated features in php 7.4: https://www.php.net/manual/en/migration74.deprecated.php

mikeburrelljr commented 4 years ago

@eoghantelnyx Sorry, I had closed this as it failed build check - and never pushed an updated fix. There is a syntax error as isset() only takes one param, not two - it will cause a fatal error in the build. Please correct!