function install_verify_database_settings
install_verify_database_settings($site_path)
Verifies that settings.php specifies a valid database connection.
Parameters
string $site_path: The site path.
Return value
bool TRUE if there are no database errors.
File
- core/includes/install.core.inc, line 1095
- API functions for installing Drupal.
Code
function install_verify_database_settings($site_path) { if ($database = Database::getConnectionInfo()) { $database = $database['default']; $settings_file = './' . $site_path . '/settings.php'; $errors = install_database_errors($database, $settings_file); if (empty($errors)) { return TRUE; } } return FALSE; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!install.core.inc/function/install_verify_database_settings/8.1.x