From 6047bcab55e7fff73eb8c0d50713e9ecd9fc13c2 Mon Sep 17 00:00:00 2001 From: Hannes Papenberg Date: Thu, 29 Aug 2024 09:49:11 +0200 Subject: [PATCH] Adding a check --- components/com_contact/src/Service/Router.php | 2 +- components/com_content/src/Service/Router.php | 2 +- components/com_newsfeeds/src/Service/Router.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/com_contact/src/Service/Router.php b/components/com_contact/src/Service/Router.php index 7e3d51ea6752f..34969b8e99e67 100644 --- a/components/com_contact/src/Service/Router.php +++ b/components/com_contact/src/Service/Router.php @@ -159,7 +159,7 @@ public function getCategoriesSegment($id, $query) */ public function getContactSegment($id, $query) { - if ($this->noIDs) { + if ($this->noIDs && strpos($id, ':')) { list($void, $segment) = explode(':', $id, 2); return [$void => $segment]; diff --git a/components/com_content/src/Service/Router.php b/components/com_content/src/Service/Router.php index dafc8c011603d..fd4ecec0530db 100644 --- a/components/com_content/src/Service/Router.php +++ b/components/com_content/src/Service/Router.php @@ -160,7 +160,7 @@ public function getCategoriesSegment($id, $query) */ public function getArticleSegment($id, $query) { - if ($this->noIDs) { + if ($this->noIDs && strpos($id, ':')) { list($void, $segment) = explode(':', $id, 2); return [$void => $segment]; diff --git a/components/com_newsfeeds/src/Service/Router.php b/components/com_newsfeeds/src/Service/Router.php index a2ba96d266f6f..4afcb63514fde 100644 --- a/components/com_newsfeeds/src/Service/Router.php +++ b/components/com_newsfeeds/src/Service/Router.php @@ -155,7 +155,7 @@ public function getCategoriesSegment($id, $query) */ public function getNewsfeedSegment($id, $query) { - if ($this->noIDs) { + if ($this->noIDs && strpos($id, ':')) { list($void, $segment) = explode(':', $id, 2); return [$void => $segment];