diff --git a/CRM/Core/Permission/Base.php b/CRM/Core/Permission/Base.php index 60ffbe3c9ed6..e7e5702507b4 100644 --- a/CRM/Core/Permission/Base.php +++ b/CRM/Core/Permission/Base.php @@ -398,10 +398,9 @@ public function getModulePermissions($module): array { * @return array * Array of permissions, in the same format as CRM_Core_Permission::getCorePermissions(). */ - public function getAllModulePermissions($descriptions = FALSE, &$permissions): array { - $newPermissions = []; - CRM_Utils_Hook::permission($newPermissions, $permissions); - $permissions = array_merge($permissions, $newPermissions); + public function getAllModulePermissions($descriptions = FALSE): array { + $permissions = []; + CRM_Utils_Hook::permission($permissions); if ($descriptions) { foreach ($permissions as $permission => $label) {