Dataset Must Be Array Errors


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)


The expected $mysql_charset value is incorrectly defined in the configuration.php file, preventing the system from successfully interpreting data from the MySQL® database.


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: June 14, 2024