Skip to content

Commit

Permalink
[5.3] Fix language default parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
janschoenherr committed Dec 4, 2024
1 parent 9800738 commit d0898d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/com_content/src/Helper/RouteHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ public static function getArticleRoute($id, $catid = 0, $language = null, $layou
* Get the category route.
*
* @param integer $catid The category ID.
* @param integer $language The language code.
* @param string $language The language code.
* @param string $layout The layout value.
*
* @return string The article route.
*
* @since 1.5
*/
public static function getCategoryRoute($catid, $language = 0, $layout = null)
public static function getCategoryRoute($catid, $language = null, $layout = null)
{
if ($catid instanceof CategoryNode) {
$id = $catid->id;
Expand All @@ -81,7 +81,7 @@ public static function getCategoryRoute($catid, $language = 0, $layout = null)

$link = 'index.php?option=com_content&view=category&id=' . $id;

if ($language && $language !== '*' && Multilanguage::isEnabled()) {
if (!empty($language) && $language !== '*' && Multilanguage::isEnabled()) {
$link .= '&lang=' . $language;
}

Expand Down

0 comments on commit d0898d9

Please sign in to comment.