diff --git a/lib/WebGUI/Form.pm b/lib/WebGUI/Form.pm index a1a941fc9..bca68140f 100644 --- a/lib/WebGUI/Form.pm +++ b/lib/WebGUI/Form.pm @@ -136,9 +136,9 @@ sub formHeader { croak "Second parameter must be hash reference" if ref $params ne "HASH"; - my $action = exists $params->{ action } ? $params->{ action } : $session->url->page(); - my $method = exists $params->{ method } ? $params->{ method } : "post"; - my $enctype = exists $params->{ enctype } ? $params->{ enctype } : "multipart/form-data"; + my $action = $params->{ action } || $session->url->page(); + my $method = $params->{ method } || "post"; + my $enctype = $params->{ enctype } || "multipart/form-data"; # Fix a query string in the action URL my $hidden;