Problem
You see the following error in the Activity Log at Configuration () > System Logs:
InvalidArgumentException: Dataset must be an array in /path/to/whmcs/vendor/whmcs/whmcs-foundation/lib/TableQuery.php:0
Stack trace:
#0 /path/to/whmcs/vendor/whmcs/whmcs-foundation/lib/TableModel.php(0): WHMCS\TableQuery->setData(NULL)
Cause
The expected $mysql_charset value is incorrectly defined in the configuration.php file, preventing the system from successfully interpreting data from the MySQL® database.
Solution
This troubleshooting information only applies to self-hosted WHMCS installations.
To resolve this issue:
- Edit the
configuration.phpfile in your WHMCS directory. - Add the following entry if it is not present:
$mysql_charset = 'utf8'; - If the following entry is present, remove it:
$mysql_charset = 'latin1'; - Save the file.
For more information about updating the
configuration.php file, see The configuration.php File.Last modified: 2025 October 17