I get the error when trying to run this:
query(
// Load settings from parent class
$settings = SystemComponent::getSettings();
// Get the main settings from the array we just loaded
$host = $settings['dbhost'];
$db = $settings['dbname'];
$user = $settings['dbusername'];
$pass = $settings['dbpassword'];
//the settings
$host = 'localhost';
$db = 'xxx';
$user = 'xxx';
$pass = 'xxx';
Did you mean to reassign the connection vars? OR was that a few lines of stub code you forgot to take out? Or just an example to show what $settings contains?