Skip to content
Snippets Groups Projects
Commit df7bcec7 authored by Angie Byron's avatar Angie Byron
Browse files

#302395 by chx: Minor DBTNG clean-up.

parent c17a5e70
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -712,7 +712,7 @@ final public static function getConnection($key = 'default', $target = 'default'
* TRUE if there is at least one database connection established, FALSE otherwise.
*/
final public static function isActiveConnection() {
return !empty(self::$connections);
return !empty(self::$activeKey) && !empty(self::$connections) && !empty(self::$connections[self::$activeKey]);
}
/**
......@@ -1356,7 +1356,7 @@ function db_escape_table($table) {
* query: the SQL query executed, passed through check_plain()
*/
function update_sql($sql) {
$result = Database::getActiveConnection()->query($sql/*, array(true)*/);
$result = Database::getActiveConnection()->query($sql);
return array('success' => $result !== FALSE, 'query' => check_plain($sql));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment