We log search terms to improve our documentation. For more information, read our Privacy Policy.


Dataset Must Be Array Errors

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

To resolve this issue:

  1. Edit the configuration.php file in your WHMCS directory.
  2. Add the following entry if it is not present: $mysql_charset = 'utf8';
  3. If the following entry is present, remove it: $mysql_charset = 'latin1';
  4. Save the file.
For more information about updating the configuration.php file, see The configuration.php File.

Last modified: 2025 July 28