From 361fce3ff317139ab037be29c79f0b4ec17be882 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Tue, 17 Jun 2014 19:32:50 +0200 Subject: [PATCH] small fix --- lib/Monitorix.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Monitorix.pm b/lib/Monitorix.pm index 2b34de2..94f4a56 100644 --- a/lib/Monitorix.pm +++ b/lib/Monitorix.pm @@ -90,12 +90,12 @@ sub setup_riglim { my ($rigid, $limit) = @_; my @riglim; - my ($upper, $lower) = split(':', trim($limit)); - if(trim($rigid) eq 1) { + my ($upper, $lower) = split(':', trim($limit) || "0:0"); + if(trim($rigid || 0) eq 1) { push(@riglim, "--upper-limit=" . ($upper || 0)); push(@riglim, "--lower-limit=" . ($lower || 0)); } else { - if(trim($rigid) eq 2) { + if(trim($rigid || 0) eq 2) { push(@riglim, "--upper-limit=" . ($upper || 0)); push(@riglim, "--lower-limit=" . ($lower || 0)); push(@riglim, "--rigid");