Moneris / Moneris-Gateway-API-PHP

23 stars 55 forks source link

mpgClasses.php is not compatible with PHP 8+ #20

Open samrollin1 opened 1 year ago

samrollin1 commented 1 year ago

The file mpgClasses.php throws an error on PHP 8+ when count() is being passed a null variable. (lines 2619, 2604, etc..)

From the PHP docs:

count() will now throw [TypeError] on invalid countable types passed to the value parameter. (docs)

ConnectGrid commented 1 year ago

Truly a shame, eh? A major company like Moneris can't even maintain SDKs for their APIs. This one was last updated "5 months ago", but is still using PHP 4.x-style code!

The good news is there are several 3rd-party options you can choose from, which are actively maintained.

https://packagist.org/?query=moneris