Unnecessary use of count breaking php 7 compatibility
chervaliery opened this issue · 3 comments
chervaliery commented
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
gboddin commented
It's indeed a leftover.
@here , this can probably be merged and a new release done.
Test won't be fixable at this point.
chervaliery commented
I'll appreciate a new release with this fixed 👍