Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.41 #21148

Merged
merged 4 commits into from
Aug 16, 2021
Merged

5.41 #21148

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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