Skip to content

Commit

Permalink
Better arg count checking
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Nov 1, 2023
1 parent a30ad77 commit c64030d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Revision history for CGI-Info

0.79
Better arg count checking

0.78 Fri Oct 6 13:59:51 EDT 2023
Set HTTP status to 403 on HTTP_USER_AGENT SQL injection attack
Test::Exception hasn't been used for sometime, so removed dependancy
Expand Down
6 changes: 3 additions & 3 deletions lib/CGI/Info.pm
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ sub _warn {
%params = %{$_[0]};
} elsif(scalar(@_) % 2 == 0) {
%params = @_;
} else {
} elsif(scalar(@_) == 1) {
$params{'warning'} = shift;
}

Expand Down Expand Up @@ -1606,7 +1606,7 @@ sub get_cookie {
%params = %{$_[0]};
} elsif(scalar(@_) % 2 == 0) {
%params = @_;
} else {
} elsif(scalar(@_) == 1) {
$params{'cookie_name'} = shift;
}

Expand Down Expand Up @@ -1712,7 +1712,7 @@ sub set_logger {
%params = %{$_[0]};
} elsif(scalar(@_) % 2 == 0) {
%params = @_;
} else {
} elsif(scalar(@_) == 1) {
$params{'logger'} = shift;
}

Expand Down

0 comments on commit c64030d

Please sign in to comment.