Bug 38664: Fix updatedatabase.pl

This patch fixes the following error:
sort (...) interpreted as function at /kohadevbox/koha/installer/data/mysql/updatedatabase.pl line 25950.

sort @words and sort { $a cmp $b } @words are functionally identical because
Perl's default sort behavior is string-wise ascending order (which is exactly
what { $a cmp $b } specifies).
This commit is contained in:
Jonathan Druart 2025-02-12 06:37:06 +01:00
parent a1d1d40155
commit 60c71484ba
No known key found for this signature in database
GPG Key ID: A085E712BEF0E0F0
1 changed files with 4 additions and 2 deletions

View File

@ -25947,8 +25947,10 @@ if ( CheckVersion($DBversion) ) {
|, { Slice => {} }
);
for my $suggestion (@$suggestions) {
my ($max_date) = sort ( $suggestion->{manageddate} || (), $suggestion->{accepteddate} || (),
$suggestion->{rejecteddate} || () );
my ($max_date) = sort { $a cmp $b } (
$suggestion->{manageddate} || (), $suggestion->{accepteddate} || (),
$suggestion->{rejecteddate} || ()
);
next unless $max_date;
my $last_modif_by =
( defined $suggestion->{manageddate} and $max_date eq $suggestion->{manageddate} )