if (!scalar(@result)
&& $self->request_method && $self->request_method eq 'POST')
{
- # Some servers fail to set the QUERY_STRING parameter, which
- # causes undef issues
- $ENV{'QUERY_STRING'} = '' unless exists $ENV{'QUERY_STRING'};
- @result = $self->SUPER::url_param(@_);
+ @result = $self->url_param(@_);
}
# Fix UTF-8-ness of input parameters.
return $self->SUPER::param(@_);
}
+sub url_param {
+ my $self = shift;
+ # Some servers fail to set the QUERY_STRING parameter, which
+ # causes undef issues
+ $ENV{'QUERY_STRING'} //= '';
+ return $self->SUPER::url_param(@_);
+}
+
sub _fix_utf8 {
my $input = shift;
# The is_utf8 is here in case CGI gets smart about utf8 someday.
=item param
+=item url_param
+
=item header
=back
}
if (should_set('comment')) {
my $is_markdown = ($user->settings->{use_markdown}->{is_enabled} &&
- $cgi->param('use_markdown') eq '1') ? 1 : 0;
+ $cgi->param('use_markdown')) ? 1 : 0;
$set_all_fields{comment} = {
body => scalar $cgi->param('comment'),