From: eileen Date: Thu, 22 Mar 2018 11:49:02 +0000 (+1300) Subject: Fix regression (intra-rc) where entity not passed to hook, and fix CRM-21841 as by... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fde255528164ab6242ce293890ee4f83aac95eec;p=civicrm-core.git 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 --- 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;