Skip to content

Commit

Permalink
Routing: enforcing segment comparison for categories
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar committed Feb 6, 2023
1 parent e7d7668 commit ae83756
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/com_contact/src/Service/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public function getCategoryId($segment, $query)
return $child->id;
}
} else {
if ($child->id == (int) $segment) {
if ($child->id . ':' . $child->alias == $segment) {
return $child->id;
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/src/Service/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public function getCategoryId($segment, $query)
return $child->id;
}
} else {
if ($child->id == (int) $segment) {
if ($child->id . ':' . $child->alias == $segment) {
return $child->id;
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/com_newsfeeds/src/Service/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function getCategoryId($segment, $query)
return $child->id;
}
} else {
if ($child->id == (int) $segment) {
if ($child->id . ':' . $child->alias == $segment) {
return $child->id;
}
}
Expand Down

0 comments on commit ae83756

Please sign in to comment.