TypeError in client's Email tab
Symptom
After updating to WHMCS 8.6.1, you may see a TypeError
error when you access the client profile's Emails tab if that account contains a failed Email Campaign message:
TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /path/to/whmcs/admin/clientsemails.php:0
Hotfix
We have created a hotfix for WHMCS 8.6.1 to resolve the error:
https://whmcs.community/files/file/182-core-18323-typeerror-in-clients-email-tab/
Workaround
Update your hosting environment to PHP 7.4
or
run the following command to delete the failed entry from the tblemaillog
table:
DELETE FROM `tblemails` WHERE `failed` = 1 and userid = x;
In this example, x
is the client's ID.