metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
214 stars 156 forks source link

count(): Parameter must be an array or an object that implements Countable #143

Closed kevinvdburgt closed 6 years ago

kevinvdburgt commented 6 years ago

While using PHP 7.2, i'll get a lot of those messages:

count(): Parameter must be an array or an object that implements Countable
metaregistrar commented 6 years ago

I have added a number of is_array() checks before a count() to prevent this from happening. If you still encounter them, can you provide line numbers?

jusahah commented 6 years ago

I got similar error when using given example (from Examples directory) for creating a contact. After fixing with is_array(), I encountered following error:

Metaregistrar\EPP\eppException: Cannot add more then 3 street names to postal info
(/home/vagrant/lara_test/vendor/metaregistrar/php-epp-client/Protocols/EPP/eppData/eppContactPostalInfo.php:67)

The problem seems to be that in eppContactPostalInfo.php, the private attribute $this->street is never initialized to array...?

metaregistrar commented 6 years ago

Yes, of course. I have fixed that now.