ec-europa/iTopApi

Unnecessary use of count breaking php 7 compatibility

chervaliery opened this issue · 3 comments

Hello,

I use the iTopApi with php 7 and I have the error
count(): Parameter must be an array or an object that implements Countable In ITopClient.php line 98

Has I understand, the CURLOPT_POST will always be 1, so I don't understand the usage of count.

By removing the count and "hardcoded" the value at true, everything works for me.

As I don't see any side effect and if this can allow the php 7 compatibility, I'll propose a PR

It's indeed a leftover.

@here , this can probably be merged and a new release done.

Test won't be fixable at this point.

I'll appreciate a new release with this fixed 👍

Fixed in #9, new release published (1.0.3)