Deprecated use of non-associative array to define permissions
In grantapplications.php
, various custom permissions are defined by grantapplications_civicrm_permission()
. This uses a non-associative array to define the permissions, where index 0
is interpreted as label
and index 1
is interpreted as description
.
Since CiviCRM 5.71 this format has been deprecated in favour of using an associative (i.e. explicitly keyed) array to define label
and description
. Ref: https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_permission/.
Result is many warnings in the log file like this:
2024-04-12 12:22:35+0100 [warning] Permission 'submit online grant application' should be declared with 'label' and 'description' keys. See https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_permission/ Caller: CRM_Core_Permission::assembleBasicPermissions
Array
(
[civi.tag] => deprecated
)
2024-04-12 12:22:35+0100 [warning] Permission 'edit grant application page' should be declared with 'label' and 'description' keys. See https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_permission/ Caller: CRM_Core_Permission::assembleBasicPermissions
Array
(
[civi.tag] => deprecated
)
2024-04-12 12:22:35+0100 [warning] Permission 'delete grant application page' should be declared with 'label' and 'description' keys. See https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_permission/ Caller: CRM_Core_Permission::assembleBasicPermissions
Array
(
[civi.tag] => deprecated
)
And in email notifications:
PHP Deprecated: Permission 'submit online grant application' should be declared with 'label' and 'description' keys. See https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_permission/
Caller: CRM_Core_Permission::assembleBasicPermissions in /home/cses_org_uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php on line 1129
PHP Deprecated: Permission 'edit grant application page' should be declared with 'label' and 'description' keys. See https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_permission/
Caller: CRM_Core_Permission::assembleBasicPermissions in /home/cses_org_uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php on line 1129
PHP Deprecated: Permission 'delete grant application page' should be declared with 'label' and 'description' keys. See https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_permission/
Caller: CRM_Core_Permission::assembleBasicPermissions in /home/cses_org_uk/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php on line 1129