Skip to content

Commit a725602

Browse files
pabl0Greg Sabino Mullane
authored andcommitted
Get rid of "uninitialized value" warnings.
1 parent fc1e659 commit a725602

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

check_postgres.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2251,7 +2251,7 @@ sub run_command {
22512251
$ENV{PGSERVICE} = $db->{dbservice};
22522252
}
22532253
else {
2254-
$db->{pname} = "port=$db->{port} host=$db->{host} db=$db->{dbname} user=$db->{dbuser}";
2254+
$db->{pname} = "port=" . ($db->{port} || $opt{defaultport}) . " host=$db->{host} db=$db->{dbname} user=$db->{dbuser}";
22552255
}
22562256

22572257
## If all we want is a connection string, give it and leave now

0 commit comments

Comments
 (0)