From 7508f58f7bb1b4122e86c8842866680d54fe2fa1 Mon Sep 17 00:00:00 2001 From: Thom Seddon Date: Mon, 18 May 2015 20:12:52 +0100 Subject: [PATCH] Alert failed database selection in build-base.php Previously this would continue and subsequent queries would fail verbosely --- build-base.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build-base.php b/build-base.php index 8522579dca..f3b04f67c2 100644 --- a/build-base.php +++ b/build-base.php @@ -20,7 +20,11 @@ if ($connection === FALSE) { exit(1); } -mysql_select_db( $config['db_name'] ); +$select = mysql_select_db( $config['db_name'] ); +if ($select === FALSE) { + echo( "ERROR: Cannot select database: " . mysql_error() . "\n" ); + exit(1); +} while( !feof( $sql_fh ) ) { $line = fgetss( $sql_fh );