Fix error message when no ZM_SERVER_NAME or ZM_SERVER_HOST set

pull/1207/head
Isaac Connor 2015-10-07 08:57:50 -04:00
parent 8e75330031
commit 1367de292e
1 changed files with 4 additions and 3 deletions

View File

@ -107,12 +107,13 @@ BEGIN
$sth = $dbh->prepare_cached( 'SELECT * FROM Servers WHERE Name=?' );
if ( $Config{ZM_SERVER_NAME} ) {
$res = $sth->execute( $Config{ZM_SERVER_NAME} );
my $result = $sth->fetchrow_hashref();
$Config{ZM_SERVER_ID} = $$result{Id};
} elsif ( $Config{ZM_SERVER_HOST} ) {
$res = $sth->execute( $Config{ZM_SERVER_HOST} );
} else {
my $result = $sth->fetchrow_hashref();
$Config{ZM_SERVER_ID} = $$result{Id};
}
my $result = $sth->fetchrow_hashref();
$Config{ZM_SERVER_ID} = $$result{Id};
}
}