Skip to content

Commit

Permalink
Merge pull request #1109 from plentymarkets/fix/handle_sorting_parameter
Browse files Browse the repository at this point in the history
FIX: Reset sorting value when an array is given
  • Loading branch information
stentrop authored Jun 23, 2022
2 parents 8770bf6 + b7109eb commit 575b0de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Services/TemplateService.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ public function isCheapestSorting()
$templateConfigRepository = pluginApp(TemplateConfigService::class);

$sorting = pluginApp(Request::class)->get('sorting', '');
if (is_array($sorting)) {
// only one sorting value is accepted
// reset sorting value
$sorting = '';
}

if (strlen($sorting) === 0) {
/** @var ShopUrls $shopUrls */
$shopUrls = pluginApp(ShopUrls::class);
Expand Down

0 comments on commit 575b0de

Please sign in to comment.