This commit is contained in:
José González 2022-09-20 11:13:02 +02:00
parent 68654804b4
commit 2a63f19d38
1 changed files with 2 additions and 2 deletions

View File

@ -6232,13 +6232,13 @@ function arrayOutputSorting($sort, $sortField)
return function ($a, $b) use ($sort, $sortField) {
if ($sort === 'up') {
if (is_string($a[$sortField]) === true) {
return strnatcmp($a[$sortField], $b[$sortField]);
return strcasecmp($a[$sortField], $b[$sortField]);
} else {
return ($a[$sortField] - $b[$sortField]);
}
} else {
if (is_string($a[$sortField]) === true) {
return strnatcmp($b[$sortField], $a[$sortField]);
return strcasecmp($b[$sortField], $a[$sortField]);
} else {
return ($a[$sortField] + $b[$sortField]);
}