Validates driver specific configuration settings.
Checks to ensure correct basic database settings and that a proper connection to the database can be established.
$database: An array of driver specific configuration options.
An array of driver configuration errors, keyed by form element name.
Overrides DatabaseTasks::validateDatabaseSettings
public function validateDatabaseSettings($database) {
// Perform standard validation.
$errors = parent::validateDatabaseSettings($database);
// Verify the database is writable.
$db_directory = new SplFileInfo(dirname($database['database']));
if (!$db_directory
->isWritable()) {
$errors[$database['driver'] . '][database'] = st('The directory you specified is not writable by the web server.');
}
return $errors;
}