Closed GARMTECH closed 6 months ago
Same error i got
cron for /modules/registrars/openprovider/cron/DownloadTldPrices.php [WHMCS Application] ERROR: TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /modules/registrars/openprovider/cron/BaseCron.php:37 Stack trace: #0 /var/www/clients/client1/web5/web/account/modules/registrars/openprovider/cron/BaseCron.php(7): is_cli() #1 /var/www/clients/client1/web5/web/account/modules/registrars/openprovider/cron/DownloadTldPrices.php(8): include('...') #2 {main} {"exception":"[object] (TypeError(code: 0): count(): Argument #1 ($value) must be of type Countable|array, null given at /var/www/clients/client1/web5/web/account/modules/registrars/openprovider/cron/BaseCron.php:37)"} [] TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /modules/registrars/openprovider/cron/BaseCron.php:37
/modules/registrars/openprovider/cron/BaseCron.php(7): is_cli() /modules/registrars/openprovider/cron/DownloadTldPrices.php(8): include('...')
Hi @GARMTECH,
Thank you for reporting the issue. A fix was added for this specific error in version 5.8.0. So it is strange that you are still encountering the error. Can you please get in touch with our support team and share following details so that we can investigate this further:
@BenMeesters please create a new issue as your case is different from 'cron.php' error reported in the initial post. Please include module logs, version details of WHMCS, Openprovider module, PHP and web server.
Hi @GARMTECH,
I reviewed the stack trace with the help of our developers and confirmed that the file 'modules/registrars/openprovider/Models/Domain.php' in v5.8-beta no longer uses count() function (it was changed a couple of months ago to fix this specific error).
So it appears the error is occurring due to Domain.php file from a previous version. Please review your Openprovider module installation and ensure that Openprovider module files are replaced with new ones from v5.8-beta package.
Describe the bug After upgrade to Openprovider module v5.8-beta in PHP 8.1 environment the cron.php executes with such error:
To Reproduce Steps to reproduce the behavior:
Expected behavior No errors on cron run.
Server info: