Undefined index in legacyrouter 3.8.2

by Pzzz   Last Updated November 11, 2017 16:10 PM

I get lots of notices for components/com_content/helpers/legacyrouter.php, like:

"/home/xxx/domains/xxxxxx/public_html/cc_j34/components/com_content/helpers/legacyrouter.php on line 95\nPHP message: PHP Notice: Undefined index: view in "

I guess that bots are searching for links that don't exist anymore. At the end they get a 404, but I think the legacyrouter shouldn't give this warning.

The code, changed for 3.8.2 is:

    if ($menuItem !== null
        && $menuItem->query['view'] == $query['view']
        && isset($menuItem->query['id'], $query['id'])
        && $menuItem->query['id'] == (int) $query['id'])

with "&& $menuItem->query['view'] == $query['view']" as line 95.

Could it be possible that this 'view' is not set? In 3.8.2. a check was added for the query['id'].

Any hint of how to check and fix this....?


Related Questions

Create a custom user field for registration part

Updated November 10, 2017 15:10 PM

Hiding created date not working

Updated December 05, 2017 21:10 PM