Skip to content

Commit f487017

Browse files
authored
Merge pull request bucardo#158 from solute/fix_query_time_warning_with_empty_query
Fix uninitialized value warning with empty query
2 parents a189251 + 39de815 commit f487017

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
@@ -9074,7 +9074,7 @@ sub check_txn_idle {
90749074
$maxr->{client_addr} eq '' ? '' : (sprintf ' %s:%s', msg('address'), $maxr->{client_addr}),
90759075
($maxr->{client_port} eq '' or $maxr->{client_port} < 1)
90769076
? '' : (sprintf ' %s:%s', msg('port'), $maxr->{client_port}),
9077-
msg('query'), $maxr->{query} || $maxr->{current_query};
9077+
msg('query'), defined($maxr->{query}) ? $maxr->{query} : $maxr->{current_query};
90789078
}
90799079

90809080
## For MRTG, we can simply exit right now

0 commit comments

Comments
 (0)