Prevent warnings on PHP 8

This commit is contained in:
Tuan Pham Ngoc 2021-08-18 16:34:22 +07:00 committed by GitHub
parent d452972144
commit 8ee3f1ba1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ class WeblinksViewCategory extends JViewCategory
$path = array(array('title' => $this->category->title, 'link' => ''));
$category = $this->category->getParent();
while (($menu->query['option'] != 'com_weblinks' || $id != $category->id) && $category->id > 1)
while ($category !== null && $category->id !== 'root' && ($menu->query['option'] != 'com_weblinks' || $id != $category->id))
{
$path[] = array('title' => $category->title, 'link' => WeblinksHelperRoute::getCategoryRoute($category->id));
$category = $category->getParent();