Skip to content

Commit

Permalink
Merge pull request #11861 from eileenmcnaughton/task
Browse files Browse the repository at this point in the history
Fix bugs with hook params, functionality on contact searches
  • Loading branch information
eileenmcnaughton authored Mar 22, 2018
2 parents f3ffb29 + ccd9c37 commit 49ef732
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CRM/Core/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ abstract class CRM_Core_Task {
* ]
*/
public static function tasks() {
CRM_Utils_Hook::searchTasks(self::$objectType, self::$_tasks);
CRM_Utils_Hook::searchTasks(static::$objectType, self::$_tasks);
asort(self::$_tasks);

return self::$_tasks;
Expand Down Expand Up @@ -172,8 +172,8 @@ public static function getTask($value) {
static::tasks();

if (!CRM_Utils_Array::value($value, self::$_tasks)) {
// Children can specify a default task (eg. print), we don't here
return array();
// Children can specify a default task (eg. print), pick another if it is not valid.
$value = key(self::$_tasks);
}
return array(
CRM_Utils_Array::value('class', self::$_tasks[$value]),
Expand Down

0 comments on commit 49ef732

Please sign in to comment.