Cannot edit CiviCRM Joomla permissions (access control) in 5.37.0
Have just updated for CiviCRM 5.37.0 for Joomla and found that editing global permissions (Administer > Users and Permissions > Permissions (Access Control) > Joomla Access Control) is broken.
Upon loading the page, I get the following error: "Too few arguments to function CRM_Core_Permission_Base::getAllModulePermissions(), 1 passed in /home/cses/public_html/administrator/components/com_civicrm/civicrm/joomla/libraries/joomla/form/fields/civiperms.php on line 282 and exactly 2 expected"
Issue seems to be that CRM_Core_Permission_Base::getAllModulePermissions() requires a permissions array to be passed (by reference) as the second argument, which is updated and also returned. (Not entirely sure why it does it like this but not really of primary concern).
The following two files are therefore incompatible: https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Permission/Base.php https://github.com/civicrm/civicrm-joomla/blob/master/libraries/joomla/form/fields/civiperms.php
Looking at the GitHub repositories, I cannot immediately see which has changed and why. As a quick fix I have simply created a temporary variable but this may not be a good long-term solution.