diff options
-rw-r--r-- | Bugzilla/Util.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 4dc64fe94..91e66f9f8 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -59,20 +59,20 @@ sub is_tainted { sub trick_taint { require Carp; Carp::confess("Undef to trick_taint") unless defined $_[0]; - $_[0] =~ /^(.*)$/s; - $_[0] = $1; + my ($match) = $_[0] =~ /^(.*)$/s; + $_[0] = $match; return (defined($_[0])); } sub detaint_natural { - $_[0] =~ /^(\d+)$/; - $_[0] = $1; + my ($match) = $_[0] =~ /^(\d+)$/; + $_[0] = $match; return (defined($_[0])); } sub detaint_signed { - $_[0] =~ /^([-+]?\d+)$/; - $_[0] = $1; + my ($match) = $_[0] =~ /^([-+]?\d+)$/; + $_[0] = $match; # Remove any leading plus sign. if (defined($_[0]) && $_[0] =~ /^\+(\d+)$/) { $_[0] = $1; |