View | Details | Raw Unified | Return to bug 6724
Collapse All | Expand All

(-)a/circ/reserveratios.pl (-3 / +4 lines)
Lines 61-70 if (!defined($startdate) or $startdate !~ s/^\s*(\S+)\s*$/$1/) { # strip space Link Here
61
if (!defined($enddate)   or $enddate   !~ s/^\s*(\S+)\s*$/$1/) {   # strip spaces, remove Taint
61
if (!defined($enddate)   or $enddate   !~ s/^\s*(\S+)\s*$/$1/) {   # strip spaces, remove Taint
62
	$enddate   = format_date($todaysdate);
62
	$enddate   = format_date($todaysdate);
63
}
63
}
64
if (!defined($ratio)     or $ratio     !~ s/^\s*(0?\.?\d+)(\.0*)?\s*$/$1/) {   # strip spaces, remove Taint
64
if (!defined($ratio)) {
65
	$ratio = 3;
65
	$ratio = 3;
66
}
66
}
67
if ($ratio == 0) {
67
# Force to be a number
68
$ratio += 0;
69
if ($ratio <= 0) {
68
    $ratio = 1; # prevent division by zero
70
    $ratio = 1; # prevent division by zero
69
}
71
}
70
72
71
- 

Return to bug 6724