Skip to content

Commit

Permalink
Merge pull request #21148 from civicrm/5.41
Browse files Browse the repository at this point in the history
5.41
  • Loading branch information
seamuslee001 authored Aug 16, 2021
2 parents 1cae999 + c2f9f4e commit 8b98ad2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CRM/Core/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ abstract class CRM_Core_Task {
*
* @var array
*/
public static $_tasks = NULL;
public static $_tasks = [];

/**
* @var string
Expand Down
5 changes: 2 additions & 3 deletions CRM/Member/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public static function taskTitles() {
* set of tasks that are valid for the user
*/
public static function permissionedTaskTitles($permission, $params = []) {
$tasks = self::getTitlesFilteredByPermission(self::$_tasks, $permission === CRM_Core_Permission::EDIT);
$tasks = self::getTitlesFilteredByPermission(self::tasks(), $permission === CRM_Core_Permission::EDIT);
return parent::corePermissionedTaskTitles($tasks, $permission, $params);
}

Expand All @@ -165,8 +165,7 @@ public static function permissionedTaskTitles($permission, $params = []) {
* the set of tasks for a group of members
*/
public static function getTask($value) {
self::tasks();
if (!$value || empty(self::$_tasks[$value])) {
if (!$value || empty(self::tasks()[$value])) {
// Make the print task the default
$value = self::TASK_PRINT;
}
Expand Down
1 change: 1 addition & 0 deletions api/v3/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ function _civicrm_api3_buildprofile_submitfields($profileID, $optionsBehaviour,
*/
}
}
$profileFields[$profileID] = $profileFields[$profileID] ?? [];
uasort($profileFields[$profileID], "_civicrm_api3_order_by_weight");
return $profileFields[$profileID];
}
Expand Down

0 comments on commit 8b98ad2

Please sign in to comment.