Minor tweak, thanks to Cédric Villemain
authorGreg Sabino Mullane <[email protected]>
Wed, 7 Jan 2009 15:11:02 +0000 (10:11 -0500)
committerGreg Sabino Mullane <[email protected]>
Wed, 7 Jan 2009 15:11:02 +0000 (10:11 -0500)
check_postgres.pl

index 51df7209e930ce5c11ae2ada8ac4c82af822e602..fd4a5d70b1ed1863f2475de293b77b92937ee28b 100755 (executable)
@@ -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} = [];