File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -760,16 +760,18 @@ public function return_sort_columns(array $sortcolumns) {
760
760
761
761
global $ SESSION ;
762
762
763
- if (empty ($ this ->wbtable ->sortablecolumns )) {
763
+ if (empty ($ this ->wbtable ->sortablecolumns )) {
764
764
return null ;
765
765
}
766
766
767
+ $ isassociative = array_keys ($ this ->wbtable ->sortablecolumns ) !== range (0 , count ($ this ->wbtable ->sortablecolumns ) - 1 );
768
+
767
769
$ sortarray ['options ' ] = [];
768
770
foreach ($ this ->wbtable ->sortablecolumns as $ key => $ value ) {
769
771
770
772
// If we have an assoziative array, we have localized values.
771
773
// Else, we need to use the same value twice.
772
- if (!isset ( $ this -> wbtable -> columns [ $ key ]) ) {
774
+ if (!$ isassociative ) {
773
775
$ key = $ value ;
774
776
}
775
777
You can’t perform that action at this time.
0 commit comments