@@ -, +, @@ --- circ/reserveratios.pl | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) --- a/circ/reserveratios.pl +++ a/circ/reserveratios.pl @@ -61,10 +61,12 @@ if (!defined($startdate) or $startdate !~ s/^\s*(\S+)\s*$/$1/) { # strip space if (!defined($enddate) or $enddate !~ s/^\s*(\S+)\s*$/$1/) { # strip spaces, remove Taint $enddate = format_date($todaysdate); } -if (!defined($ratio) or $ratio !~ s/^\s*(0?\.?\d+)(\.0*)?\s*$/$1/) { # strip spaces, remove Taint +if (!defined($ratio)) { $ratio = 3; } -if ($ratio == 0) { +# Force to be a number +$ratio += 0; +if ($ratio <= 0) { $ratio = 1; # prevent division by zero } --