Hi all
If you’re a Perl 5.6.1 user, you might have noticed that pages which
take query parameters with multiple values bomb out. For instance:
http://your.rt.site/Search/Listing.html?ValueOfStatus=open&ValueOfStatus=new&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=3&RowsPerPage=50&NewSearch=1
(in this case, you are given no search results, and the page displays
a search term for Status of e.g. “Status = ARRAY(0xa97db3c)”.
A quick fix, in the top-level autohandler, is to replace this:
$ARGS{$} = Encode::decode_utf8($ARGS{$}) foreach (keys %ARGS);
with something like this:
foreach (keys %ARGS) {
if (ref $ARGS{$} eq ‘ARRAY’) {
for my $i (0…$#{$ARGS{$}}) {
$ARGS{$}->[$i] = Encode::decode_utf8($ARGS{$}->[$i]);
}
}
else {
$ARGS{$} = Encode::decode_utf8($ARGS{$});
}
}
I presume therefore that Perl > 5.6.1’s Encode::decode_utf8() deals
properly with listrefs - does anyone know if this is true? Or does
rt exhibit this problem on greater Perl versions than mine as well?
Bye
Paolo