summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 740f635d9..36f04d1aa 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -2336,7 +2336,7 @@ sub run_command {
$db->{ok} = 1;
## Unfortunately, psql outputs "(No rows)" even with -t and -x
- $db->{slurp} = '' if index($db->{slurp},'(')==0;
+ $db->{slurp} = '' if ! defined $db->{slurp} or index($db->{slurp},'(')==0;
## Allow an empty query (no matching rows) if requested
if ($arg->{emptyok} and $db->{slurp} =~ /^\s*$/o) {