Skip to content

Commit

Permalink
- Prevent adding double slash on sort column name
Browse files Browse the repository at this point in the history
  • Loading branch information
alvaro-canepa committed Oct 31, 2020
1 parent 7bf7dcb commit c483a5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/api/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ protected function applyFilters(): ?ElementCollection

if ($obCollection->methodExists('sort') && $arSort['column']) {
$sSort = $arSort['column'];
if ($sSort != 'no') {
if ($sSort != 'no' && !str_contains($sSort, '|')) {
$sSort .= '|'.$arSort['direction'];
}
$obCollection = $obCollection->sort($sSort);
Expand Down

0 comments on commit c483a5a

Please sign in to comment.