Email Marketer TypeErrors
On this page
Problem
After updating to WHMCS 8.6.1, you may see a TypeError
error when sending Email Marketer rules during the daily automation tasks:
TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given in /path/to/whmcs/vendor/whmcs/whmcs-foundation/lib/Cron/Task/EmailMarketer.php:0
Cause
An invalid value in the Email Marketer rule (a missing billing cycle) causes an error in PHP 8.1 environments only.
Workaround
To work around this issue:
- Go to Utilities > Email Marketer.
- Edit the first Email Marketer rule.
- Without making any changes, click Save Changes.
- Repeat this process for each Email Marketer rule.
After you do this for all of your Email Marketer rules, the error will resolve.
Last modified: October 29, 2024