From 4c77b3fc0cb71556a82a8f20edf4b6ba19e838b2 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 13 Apr 2021 08:49:16 -0400 Subject: [PATCH] Update WP permission page for new string array keys This fixes an undefined index notice for permissions that use the new-style 'label' and 'description' array keys instead of numeric keys. --- CRM/ACL/Form/WordPress/Permissions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/ACL/Form/WordPress/Permissions.php b/CRM/ACL/Form/WordPress/Permissions.php index 8ccf608240..8301d13ddd 100644 --- a/CRM/ACL/Form/WordPress/Permissions.php +++ b/CRM/ACL/Form/WordPress/Permissions.php @@ -69,7 +69,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form { $descArray = []; foreach ($permissionsDesc as $perm => $attr) { if (count($attr) > 1) { - $descArray[$perm] = $attr[1]; + $descArray[$perm] = $attr['description'] ?? $attr[1]; } } -- 2.25.1