explode if there is no db connection made

pull/248/head
David Goodwin 6 years ago
parent 0afdb5619b
commit 28870e4b45

@ -1433,11 +1433,16 @@ EOF;
*
* Return value:
*
* @return \PDO|false
* @return \PDO
*/
function db_connect() {
list($link, $_) = db_connect_with_errors();
unset($_);
if(!$link instanceof PDO) {
throw new Exception("Database connection failed");
}
return $link;
}

Loading…
Cancel
Save