diff --git a/components/com_users/controllers/user.php b/components/com_users/controllers/user.php index 8eccdcce78021..eb952dbc6c36d 100644 --- a/components/com_users/controllers/user.php +++ b/components/com_users/controllers/user.php @@ -232,8 +232,9 @@ public function menulogout() { // Get the ItemID of the page to redirect after logout $app = JFactory::getApplication(); - $itemid = $app->getMenu()->getActive()->params->get('logout'); - + $active = $app->getMenu()->getActive(); + $itemid = $active ? $active->getParams()->get('logout') : 0; + // Get the language of the page when multilang is on if (JLanguageMultilang::isEnabled()) {