Fix code warning messages in newer Perl installs

This commit is contained in:
Manuel Cillero 2020-04-12 12:50:11 +02:00
parent 58ead7c11f
commit 27ed9214ef
7 changed files with 48 additions and 22 deletions

View file

@ -63,7 +63,7 @@ sub Action__html {
if (!is_empty($$arg_ref{DEFAULT})) {
my @default = split(' ', $$arg_ref{DEFAULT});
if (defined($list_columns{$default[0]}) && !defined($default[2])) {
my $dir = in_array(uc($default[1]), 'ASC', 'DESC') ? uc($default[1]) : 'ASC';
my $dir = defined($default[1]) && in_array(uc($default[1]), 'ASC', 'DESC') ? uc($default[1]) : 'ASC';
$default = strval($default[0], ' ', $dir);
}
}
@ -106,7 +106,7 @@ sub Action__js {
if (!is_empty($$arg_ref{DEFAULT})) {
my @default = split(' ', $$arg_ref{DEFAULT});
if (defined($list_columns{$default[0]}) && !defined($default[2])) {
my $dir = in_array(uc($default[1]), 'ASC', 'DESC') ? uc($default[1]) : 'ASC';
my $dir = defined($default[1]) && in_array(uc($default[1]), 'ASC', 'DESC') ? uc($default[1]) : 'ASC';
$default = strval($default[0], ' ', $dir);
}
}