psecio/iniscan

PHP 7.4 compatibility: warning and error

noraj opened this issue · 0 comments

noraj commented

Every scan command ends with:

PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /tmp/iniscan/vendor/psecio/iniscan/src/Psecio/Iniscan/Command/ScanCommand/Output/Console.php on line 101
Script iniscan handling the __exec_command event returned with error code 1

For the warning, I doesn't seem that count()is used here:

it may be a cascading from

return (count($parts) === 1)

or

return (count($parts) == 1) ? 'PHP' : $parts[0];

https://www.php.net/manual/en/function.count.php

For the error (2nd line) however, it comes only when using composer, eg. composer exec iniscan scan -- --path=/path/to/php.ini instead of vendor/bin/iniscan scan --path=/path/to/php.ini