diff --git a/app/helpers.php b/app/helpers.php index 191eddf4d..837b7fcfd 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -147,7 +147,7 @@ function icon(string $name, array $attrs = []): string } /** - * Generate a url with multiple parameters for sorting purposes. + * Generate a URL with multiple parameters for sorting purposes. * Works out the logic to set the correct sorting direction * Discards empty parameters and allows overriding. */ @@ -172,7 +172,7 @@ function sortUrl(string $path, array $data, array $overrideData = []): string } if (count($queryStringSections) === 0) { - return $path; + return url($path); } return url($path . '?' . implode('&', $queryStringSections));