From: Greg Sabino Mullane Date: Wed, 7 Jan 2009 15:11:02 +0000 (-0500) Subject: Minor tweak, thanks to Cédric Villemain X-Git-Tag: 2.9.0~198 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=58e1cb251f235a1afeae0b31ec7a42e0bc1e10dd;p=check_postgres.git Minor tweak, thanks to Cédric Villemain --- diff --git a/check_postgres.pl b/check_postgres.pl index 51df7209e..fd4a5d70b 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -926,7 +926,7 @@ sub run_command { ## Don't set any default values if a service is being used - if (defined $opt{dbservice} and length $opt{dbservice}->[0]) { + if (defined $opt{dbservice} and defined $opt{dbservice}->[0] and length $opt{dbservice}->[0]) { $conn->{dbname} = []; $conn->{port} = []; $conn->{dbuser} = [];