mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Alert failed database selection in build-base.php
Previously this would continue and subsequent queries would fail verbosely
This commit is contained in:
@@ -20,7 +20,11 @@ if ($connection === FALSE) {
|
|||||||
exit(1);
|
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 ) ) {
|
while( !feof( $sql_fh ) ) {
|
||||||
$line = fgetss( $sql_fh );
|
$line = fgetss( $sql_fh );
|
||||||
|
Reference in New Issue
Block a user