From fde255528164ab6242ce293890ee4f83aac95eec Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 23 Mar 2018 00:49:02 +1300 Subject: [PATCH] Fix regression (intra-rc) where entity not passed to hook, and fix CRM-21841 as by-product. The self::objectType is passing NULL - the object type on the parent. Switching to static::objectType uses the child. https://stackoverflow.com/questions/1912902/what-exactly-are-late-static-bindings-in-php --- CRM/Core/Task.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/Task.php b/CRM/Core/Task.php index caa1107f8b..413328b485 100644 --- a/CRM/Core/Task.php +++ b/CRM/Core/Task.php @@ -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; -- 2.25.1