Steps to reproduce the issue
PHP throws a TypeError on logout from the site. This is because getMenuLanguage is called with the wrong argument in com_users/src/Controller/UserController.php within method logout on line 146 (Joomla 4.2.2), which was introduced with Joomla 4.2.0.
Expected result
getMenuLanguage needs to be called with $return == menu id (xxx) as int, not with $return == 'index.php?Itemid=xxx'
Actual result
System information (as much as possible)
Joomla 4.2.2, Apache 2.4, PHP 7.4
Additional comments
This is the pull request where the change was made #38299