Skip to content

Commit

Permalink
# [#32868] Trashed categories create a fatal error when creating URLs
Browse files Browse the repository at this point in the history
to them, URLs to contact categories are wrong. Thanks Hannes Papenberg
(Fix #2636)
  • Loading branch information
Hannes Papenberg authored and infograf768 committed Dec 4, 2013
1 parent b34f7e1 commit 5af3c90
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/com_contact/helpers/route.php
Expand Up @@ -66,7 +66,7 @@ public static function getCategoryRoute($catid)
$category = JCategories::getInstance('Contact')->get($id);
}

if($id < 1)
if ($id < 1 || !($category instanceof JCategoryNode))
{
$link = '';
}
Expand All @@ -83,7 +83,7 @@ public static function getCategoryRoute($catid)

if ($item = self::_findItem($needles))
{
$link = 'index.php?Itemid='.$item;
$link .= '&Itemid='.$item;
}
}

Expand Down
2 changes: 1 addition & 1 deletion components/com_newsfeeds/helpers/route.php
Expand Up @@ -68,7 +68,7 @@ public static function getCategoryRoute($catid)
$category = JCategories::getInstance('Newsfeeds')->get($id);
}

if($id < 1)
if ($id < 1 || !($category instanceof JCategoryNode))
{
$link = '';
}
Expand Down
3 changes: 2 additions & 1 deletion components/com_weblinks/helpers/route.php
Expand Up @@ -86,7 +86,8 @@ public static function getCategoryRoute($catid)
$category = JCategories::getInstance('Weblinks')->get($id);
}

if ($id < 1) {
if ($id < 1 || !($category instanceof JCategoryNode))
{
$link = '';
}
else {
Expand Down
3 changes: 3 additions & 0 deletions installation/CHANGELOG
Expand Up @@ -26,6 +26,9 @@ $ -> Language fix or change
- -> Removed
! -> Note

04-Dec-2013 Jean-Marie Simonet
# [#32868] Trashed categories create a fatal error when creating URLs to them, URLs to contact categories are wrong. Thanks Hannes Papenberg

26-Nov-2013 Jean-Marie Simonet
# [#32812] *Wrong JText causes double string use

Expand Down

0 comments on commit 5af3c90

Please sign in to comment.